Skip to content

Commit

Permalink
fix: add types
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 27, 2022
1 parent 177d62f commit f1b7af3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export class FetchError<T = any> extends Error {
request?: FetchRequest
response?: FetchResponse<T>
data?: T
statusCode?: number
statusMessage?: string
}

export function createFetchError<T = any> (request: FetchRequest, error?: Error, response?: FetchResponse<T>): FetchError<T> {
Expand Down

0 comments on commit f1b7af3

Please sign in to comment.