This repository has been archived on 2024-09-23. You can view files and clone it, but cannot push or open issues or pull requests.
rocketchat-scim/errors/EmptyResponseError.ts

14 lines
529 B
TypeScript
Raw Normal View History

2022-02-14 13:03:16 +00:00
import { HttpStatusCode } from "@rocket.chat/apps-engine/definition/accessors";
import { SCIMError, SCIMErrorType } from "../scim/Error";
import { BaseError } from "./BaseError";
export class EmptyResponseError extends BaseError {
public message = "Rocket.Chat API returned an empty response";
public toSCIMError(): SCIMError {
return new SCIMError()
.setStatus(HttpStatusCode.INTERNAL_SERVER_ERROR)
.setScimType(SCIMErrorType.INVALID_VALUE)
.setDetail(this.message);
}
}