diff --git a/APIError.ts b/APIError.ts index 7f71505..34101d3 100644 --- a/APIError.ts +++ b/APIError.ts @@ -2,7 +2,7 @@ export class APIError extends Error { response: Response; json: unknown; constructor( - { response, message }: { + { response, json, message }: { response: Response; json?: unknown; message?: string; @@ -10,5 +10,6 @@ export class APIError extends Error { ) { super(message); this.response = response; + this.json = json; } }