Skip to content

Commit

Permalink
fix: enable requests timeout after 5mins
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Aug 4, 2022
1 parent 85526dd commit d08d6cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/request/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ const makeSnykRequest = async (
baseURL: request.useRESTApi ? apiUrlREST : apiUrl,
responseType: 'json',
headers: { ...requestHeaders, ...request.headers },
transitional: {
clarifyTimeoutError: true,
},
timeout: 30_000, // 5 mins same as Snyk APIs
});

try {
Expand Down

0 comments on commit d08d6cb

Please sign in to comment.