We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My setup:
import axios, { AxiosRequestConfig } from "axios"; import https from "https"; import axiosRetry, { isNetworkOrIdempotentRequestError, IAxiosRetryConfig } from "axios-retry"; const run = async () => { try { const axiosRequestConfig: AxiosRequestConfig = { timeout: 66, withCredentials: false, httpsAgent: new https.Agent({ rejectUnauthorized: true }), }; const axiosInstance = axios.create(axiosRequestConfig); const axiosRetryConfig: IAxiosRetryConfig = { retries: 5, retryDelay: (retryCount) => retryCount * 1000, retryCondition: (error) => { console.log(12345, "retry", error.message); return ( isNetworkOrIdempotentRequestError(error) || error.code === "ECONNABORTED" ); }, }; axiosRetry(axiosInstance as any, axiosRetryConfig); const { data } = await axiosInstance.get( "https://jsonplaceholder.typicode.com/todos/1" ); console.log(data); } catch (error) { console.log("error"); } };
and the cosole.log() says:
12345 retry timeout of 66ms exceeded 12345 retry timeout of 1ms exceeded 12345 retry timeout of 1ms exceeded 12345 retry timeout of 1ms exceeded 12345 retry timeout of 1ms exceeded
the 1st retry is with 66ms and the others with 1ms
66ms
1ms
The text was updated successfully, but these errors were encountered:
same issue here. it works as expected when shouldResetTimeout: true but not when it's false/undefined like in the scenario above.
shouldResetTimeout: true
Sorry, something went wrong.
maybe related with #220 have you tried las version?
No branches or pull requests
My setup:
and the cosole.log() says:
the 1st retry is with
66ms
and the others with1ms
The text was updated successfully, but these errors were encountered: