@coder/backstage-plugin-coder
Version:
Create and manage Coder workspaces from Backstage
24 lines (22 loc) • 520 B
JavaScript
class BackstageHttpError extends Error {
#response;
constructor(errorMessage, response) {
super(errorMessage);
this.name = "HttpError";
this.#response = response;
}
static isInstance(value) {
return value instanceof BackstageHttpError;
}
get status() {
return this.#response.status;
}
get ok() {
return this.#response.ok;
}
get contentType() {
return this.#response.headers.get("content_type");
}
}
export { BackstageHttpError };
//# sourceMappingURL=errors.esm.js.map