2022-10-20 09:45:59 -04:00
|
|
|
export class APIError extends Error {
|
|
|
|
|
response: Response;
|
|
|
|
|
json: unknown;
|
|
|
|
|
constructor(
|
2022-10-20 09:49:41 -04:00
|
|
|
{ response, json, message }: {
|
2022-10-20 09:45:59 -04:00
|
|
|
response: Response;
|
|
|
|
|
json?: unknown;
|
|
|
|
|
message?: string;
|
|
|
|
|
},
|
|
|
|
|
) {
|
|
|
|
|
super(message);
|
|
|
|
|
this.response = response;
|
2022-10-20 09:49:41 -04:00
|
|
|
this.json = json;
|
2022-10-20 09:45:59 -04:00
|
|
|
}
|
|
|
|
|
}
|