chore: increase axios timeout for git specific APIs (#10732)

This commit is contained in:
Rishabh Saxena 2022-01-31 09:48:58 +05:30 committed by GitHub
parent 8c4d711f5b
commit 2e92b3a05e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,6 +42,11 @@ export const apiRequestInterceptor = (config: AxiosRequestConfig) => {
if (branch) {
config.headers.branchName = branch;
}
if (config.url?.indexOf("/git/") !== -1) {
config.timeout = 1000 * 120; // increase timeout for git specific APIs
}
return { ...config, timer: performance.now() };
};