You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add some logging by using the retryCondition as proposed in #134 (comment).
In the message I want to log the current retryCount and the total retries.
For example: 'Re-trying {url} (1/3 tries)'.
However, I cannot access the 'retries' config variable (which is the total amount of retries) from the AxiosError object.
There seems to be a AxiosError.config['axios-retry'] in the error object that according to its types should match IAxiosRetry.IAxiosRetryConfig. Instead the AxiosError.config['axios-retry'] seems to contain a shape of { retryCount: number, lastRequestTime: number}.
It would be great if the { retryCount: number, lastRequestTime: number} is either merged with the existing IAxiosRetry.IAxiosRetryConfig, or use a different variable name instead.
The text was updated successfully, but these errors were encountered:
t would be great if the { retryCount: number, lastRequestTime: number} is either merged with the existing IAxiosRetry.IAxiosRetryConfig, or use a different variable name instead.
This. I believe retry-axios does this and export the type.
I am trying to add some logging by using the retryCondition as proposed in #134 (comment).
In the message I want to log the current retryCount and the total retries.
For example: 'Re-trying {url} (1/3 tries)'.
However, I cannot access the 'retries' config variable (which is the total amount of retries) from the
AxiosError
object.There seems to be a
AxiosError.config['axios-retry']
in the error object that according to its types should matchIAxiosRetry.IAxiosRetryConfig
. Instead theAxiosError.config['axios-retry']
seems to contain a shape of{ retryCount: number, lastRequestTime: number}
.It would be great if the
{ retryCount: number, lastRequestTime: number}
is either merged with the existingIAxiosRetry.IAxiosRetryConfig
, or use a different variable name instead.The text was updated successfully, but these errors were encountered: