UNPKG

@eleva-io/erp-sdk

Version:

SDK oficial para el ERP de Eleva

29 lines 963 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ValidationError = exports.SDKError = void 0; /** * @deprecated Use `ElevaError` from `src/errors` instead. * `SDKError` and `ValidationError` are kept only for backwards compatibility * and will be removed in a future version. */ class SDKError extends Error { statusCode; constructor(message, statusCode) { super(message); this.statusCode = statusCode; if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } } } exports.SDKError = SDKError; /** @deprecated Use `ElevaError` with `ErrorCode.VALIDATION` from `src/errors` instead. */ class ValidationError extends SDKError { errors; constructor(errors = [], message = 'Validation error') { super(message, 400); this.errors = errors; } } exports.ValidationError = ValidationError; //# sourceMappingURL=errors.js.map