Skip to content

Commit

Permalink
Update errors.ts
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
fin-dogedev committed Mar 14, 2024
1 parent c6f8172 commit 99de8e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/core/errors.ts
Expand Up @@ -96,7 +96,7 @@ export class HTTPError<T = any> extends RequestError<T> {
declare readonly timings: Timings;

constructor(response: PlainResponse) {
super(`Response code ${response.statusCode} (${response.statusMessage!}), Body: ${response.body}`, {}, response.request);
super(`Response code ${response.statusCode} (${response.statusMessage!}), Body: ${response?.body}`, {}, response.request);

Check failure on line 99 in source/core/errors.ts

View workflow job for this annotation

GitHub Actions / Node.js 20 on macos-latest

Invalid type "unknown" of template literal expression.
this.name = 'HTTPError';
this.code = 'ERR_NON_2XX_3XX_RESPONSE';
}
Expand Down

0 comments on commit 99de8e4

Please sign in to comment.