@atomiqlabs/sdk-lib
Version:
Basic SDK functionality library for atomiq
26 lines (20 loc) • 553 B
text/typescript
/**
* An error when the payment authorization returned by the intermediary is invalid
*/
export class PaymentAuthError extends Error {
code: number;
data: any;
constructor(msg: string, code?: number, data?: any) {
super(msg);
this.data = data;
this.code = code;
// Set the prototype explicitly.
Object.setPrototypeOf(this, PaymentAuthError.prototype);
}
getCode(): number {
return this.code;
}
getData(): any {
return this.data;
}
}