dydx-v4-web/src/lib/errors.ts
James Jia - Test 4b86068d8f
Initial commit
2023-09-08 13:52:13 -07:00

15 lines
334 B
TypeScript

/**
* Error thrown if StatefulOrder includes an error code in it's response.
*/
export class StatefulOrderError extends Error {
response: any;
code: number;
constructor(message: any, response: any) {
super(message);
this.name = 'StatefulOrderError';
this.response = response;
this.code = response.code;
}
}