Skip to content

Commit

Permalink
feat: add missing error type
Browse files Browse the repository at this point in the history
  • Loading branch information
Gigioliva committed Dec 18, 2024
1 parent 3eeeeb7 commit 9a4487e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions types/errors.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ declare namespace Errors {
code: 'UND_ERR_BODY_TIMEOUT'
}

export class ResponseError extends UndiciError {
constructor (
message: string,
code: number,
options: {
headers?: IncomingHttpHeaders | string[] | null,
body?: null | Record<string, any> | string
}
)
name: 'ResponseError'
code: 'UND_ERR_RESPONSE'
statusCode: number
body: null | Record<string, any> | string
headers: IncomingHttpHeaders | string[] | null
}

export class ResponseStatusCodeError extends UndiciError {
constructor (
message?: string,
Expand Down

0 comments on commit 9a4487e

Please sign in to comment.