UNPKG

@shapediver/sdk.geometry-api-sdk-v2

Version:
48 lines 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TimeoutError = exports.IllegalArgumentError = exports.ResponseError = exports.RequestError = exports.SdGeometryError = void 0; const client_1 = require("./client"); class SdGeometryError extends Error { constructor(message) { super(message); this.name = 'SdGeometryError'; } } exports.SdGeometryError = SdGeometryError; class RequestError extends SdGeometryError { constructor(message) { super(message); this.name = 'RequestError'; } } exports.RequestError = RequestError; class ResponseError extends SdGeometryError { constructor(status, message, desc, type) { super(message); this.name = 'ResponseError'; this.status = status; this.description = desc; this.type = type && Object.values(client_1.ResErrorType).includes(type) ? type : client_1.ResErrorType.UNKNOWN; } } exports.ResponseError = ResponseError; class IllegalArgumentError extends SdGeometryError { constructor(field, msg) { super(msg); this.field = field; this.name = 'IllegalArgumentError'; } } exports.IllegalArgumentError = IllegalArgumentError; class TimeoutError extends SdGeometryError { constructor(field, msg) { super(msg); this.field = field; this.name = 'TimeoutError'; } } exports.TimeoutError = TimeoutError; //# sourceMappingURL=error.js.map