Files
xrpl-dev-portal/_code-samples/issue-credentials/js/errors.js
2025-04-15 11:44:21 +01:00

18 lines
398 B
JavaScript

export class ValueError extends Error {
constructor(message) {
super(message);
this.name = "ValueError";
this.status = 400;
this.type = "badRequest";
}
}
export class XRPLTxError extends Error {
constructor(xrplResponse, status = 400) {
super("XRPL transaction failed");
this.name = "XRPLTxError";
this.status = status;
this.body = xrplResponse.result;
}
}