UNPKG

@careevolution/orchestrate

Version:

A TypeScript client for the Orchestrate API

32 lines (31 loc) 983 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OrchestrateClientError = exports.OrchestrateHttpError = exports.OrchestrateError = void 0; class OrchestrateError extends Error { constructor(message) { super(message); this.name = this.constructor.name; } } exports.OrchestrateError = OrchestrateError; class OrchestrateHttpError extends OrchestrateError { constructor(message) { super(message); this.name = this.constructor.name; } } exports.OrchestrateHttpError = OrchestrateHttpError; 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; } } exports.OrchestrateClientError = OrchestrateClientError;