@careevolution/orchestrate
Version:
A TypeScript client for the Orchestrate API
26 lines (25 loc) • 673 B
JavaScript
export class OrchestrateError extends Error {
constructor(message) {
super(message);
this.name = this.constructor.name;
}
}
export class OrchestrateHttpError extends OrchestrateError {
constructor(message) {
super(message);
this.name = this.constructor.name;
}
}
export class OrchestrateClientError extends OrchestrateError {
constructor(response_text, issues) {
let message;
if (issues.length > 0) {
message = `\n * ${issues.join(" \n * ")}`;
}
else {
message = response_text;
}
super(message);
this.name = this.constructor.name;
}
}