@paddle/paddle-node-sdk
Version:
A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.
22 lines (21 loc) • 621 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiError = void 0;
class ApiError extends Error {
type;
code;
detail;
documentationUrl;
errors;
retryAfter;
constructor(errorDetail, retryAfter) {
super(errorDetail.detail);
this.type = errorDetail.type;
this.code = errorDetail.code;
this.detail = errorDetail.detail;
this.documentationUrl = errorDetail.documentation_url;
this.errors = errorDetail.errors ? errorDetail.errors : null;
this.retryAfter = retryAfter;
}
}
exports.ApiError = ApiError;