mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2026-02-16 20:02:25 +00:00
18 lines
390 B
JavaScript
18 lines
390 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
|
|
}
|
|
}
|