@montarist/nilvera-api
Version:
An unofficial SDK for integrating with Nilvera e-Invoice, e-Archive services
22 lines (21 loc) • 811 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NilveraApiError = void 0;
class NilveraApiError extends Error {
constructor(message, statusCode, errorCode, errorDetails, requestUrl, requestData, curlCommand) {
super(message);
this.message = message;
this.statusCode = statusCode;
this.errorCode = errorCode;
this.errorDetails = errorDetails;
this.requestUrl = requestUrl;
this.requestData = requestData;
this.curlCommand = curlCommand;
this.name = 'NilveraApiError';
}
toString() {
return `NilveraApiError: ${this.message} (Status: ${this.statusCode}, Code: ${this.errorCode || 'N/A'})
Curl Command: ${this.curlCommand || 'N/A'}`;
}
}
exports.NilveraApiError = NilveraApiError;