Skip to content

Commit

Permalink
Add axios-better-stacktrace
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Nov 7, 2023
1 parent 4f3bab8 commit 051578d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
},
"dependencies": {
"axios": "^1.5.0",
"axios-better-stacktrace": "^2.1.5",
"axios-retry": "^3.8.0"
},
"devDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions src/lib/seam/connect/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import axios, { type AxiosInstance, type AxiosRequestConfig } from 'axios'
// @ts-expect-error https://github.com/svsool/axios-better-stacktrace/issues/12
import axiosBetterStacktrace from 'axios-better-stacktrace'
import axiosRetry, { type AxiosRetry, exponentialDelay } from 'axios-retry'

import { paramsSerializer } from 'lib/params-serializer.js'
Expand All @@ -21,6 +23,8 @@ export const createClient = (options: ClientOptions): AxiosInstance => {
...options.axiosOptions,
})

axiosBetterStacktrace(axios)

// @ts-expect-error https://github.com/softonic/axios-retry/issues/159
axiosRetry(client, {
retries: 2,
Expand Down

0 comments on commit 051578d

Please sign in to comment.