Skip to content

Commit

Permalink
increase axios timeout (#1062)
Browse files Browse the repository at this point in the history
Co-authored-by: Chandra Y <cyemparala@tacc.utexas.edu>
  • Loading branch information
rstijerina and chandra-tacc authored Feb 25, 2025
1 parent 75e65ea commit 01a6aa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions client/src/hooks/datafiles/mutations/useUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import Cookies from 'js-cookie';
import truncateMiddle from 'utils/truncateMiddle';
import { useMutation } from '@tanstack/react-query';

apiClient.defaults.timeout = 5 * 60 * 1000; // 5 minutes

export async function uploadUtil({
api,
scheme,
Expand Down
2 changes: 1 addition & 1 deletion client/src/utils/apiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import axios, { AxiosError } from 'axios';
export type TApiError = AxiosError<{ message?: string }>;

export const apiClient = axios.create({
timeout: 30000,
timeout: 60 * 1000, // 1 minute
xsrfHeaderName: 'X-CSRFToken',
xsrfCookieName: 'csrftoken',
});

0 comments on commit 01a6aa0

Please sign in to comment.