@paddle/paddle-node-sdk
Version:
A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.
11 lines (10 loc) • 363 B
JavaScript
export class ApiError extends Error {
constructor(errorDetail) {
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;
}
}