import { HttpStatusCode } from "@rocket.chat/apps-engine/definition/accessors";
import { SCIMError, SCIMErrorType } from "../scim/Error";
import { BaseError } from "./BaseError";
export class UnauthorizedError extends BaseError {
public message = "The username or password is missing or incorrect.";
public toSCIMError(): SCIMError {
return new SCIMError()
.setStatus(HttpStatusCode.UNAUTHORIZED)
.setScimType(SCIMErrorType.INVALID_SYNTAX)
.setDetail(this.message);
}