UNPKG

@eleva-io/erp-sdk

Version:

SDK oficial para el ERP de Eleva

24 lines 775 B
/** * @deprecated Use `ElevaError` from `src/errors` instead. * `SDKError` and `ValidationError` are kept only for backwards compatibility * and will be removed in a future version. */ export class SDKError extends Error { statusCode; constructor(message, statusCode) { super(message); this.statusCode = statusCode; if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } } } /** @deprecated Use `ElevaError` with `ErrorCode.VALIDATION` from `src/errors` instead. */ export class ValidationError extends SDKError { errors; constructor(errors = [], message = 'Validation error') { super(message, 400); this.errors = errors; } } //# sourceMappingURL=errors.js.map