UNPKG

verimor-api-sdk

Version:
20 lines 639 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ErrorResponse = void 0; /** * Custom Error class for handling API error responses. */ class ErrorResponse extends Error { /** * Creates an instance of ErrorResponse. * @param errorData - The error data returned by the API. */ constructor(errorData) { super(errorData.message || 'An error occurred'); this.name = 'ErrorResponse'; this.code = errorData.code; this.errors = errorData.errors; } } exports.ErrorResponse = ErrorResponse; //# sourceMappingURL=error-response.js.map