Skip to content
New issue

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

Fix retry handling for timeouts #88

Merged
merged 1 commit into from
Jan 18, 2023
Merged

Fix retry handling for timeouts #88

merged 1 commit into from
Jan 18, 2023

Conversation

eskrm
Copy link
Contributor

@eskrm eskrm commented Jan 18, 2023

No description provided.

@sonarcloud
Copy link

sonarcloud bot commented Jan 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

src/axios.ts Show resolved Hide resolved
retryCondition: isRetryableError,
retryCondition: (error) => {
// Timeouts should be retryable
return error.code === 'ECONNABORTED' || isRetryableError(error);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timeout errors due to config.timeout aren't considered retryable by isRetryableError(Error).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we use isRetryableError elsewhere - should we wrap this into our own isRetryableError function so it can be reused?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/search?q=org%3Afaros-ai+isRetryableError&type=code

We do use it in other places, but I think it's triggered in combination with a client side timeout. Otherwise we'll just get a 504 and retry.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@eskrm eskrm merged commit baf74ee into main Jan 18, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 18, 2023
@eskrm eskrm deleted the es/fixretries branch January 18, 2023 18:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants