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

Retry ERR_NETWORK error in Axios requests #2903

Open
dhruvkb opened this issue Aug 27, 2023 · 7 comments
Open

Retry ERR_NETWORK error in Axios requests #2903

dhruvkb opened this issue Aug 27, 2023 · 7 comments
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend ⌨️ tech: typescript Involves TypeScript 🔧 tech: vue Involves Vue.js

Comments

@dhruvkb
Copy link
Member

dhruvkb commented Aug 27, 2023

Description

Axios requests can, in many cases, fail with ERR_NETWORK if the network connection is unstable. These errors must be handled with a certain number of retries followed by a message to the user regarding the error.

@dhruvkb dhruvkb added 🟨 priority: medium Not blocking but should be addressed soon 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository 🧱 stack: frontend Related to the Nuxt frontend labels Aug 27, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Aug 27, 2023
@sentry-io
Copy link

sentry-io bot commented Aug 27, 2023

Sentry issue: OPENVERSE-FRONTEND-131

@obulat obulat changed the title Handle ERR_NETOWORK error in Axios requests Handle ERR_NETWORK error in Axios requests Aug 27, 2023
@krysal krysal added help wanted Open to participation from the community 🟨 tech: javascript Involves JavaScript 🔧 tech: vue Involves Vue.js javascript labels Aug 30, 2023
@ArslanYM
Copy link
Contributor

ArslanYM commented Sep 3, 2023

How do you plan on alerting the user about the error? Any specific context

@dhruvkb
Copy link
Member Author

dhruvkb commented Sep 3, 2023

@ArslanYM how the user is notified of these failures would depend on the request caller. Once the main causes of these failures are determined, we might need designs for components that can communicate error state to the users (similar to how the skeletons convey loading state).

Currently we are in the step of finding the causes and hotspots in the code where these errors occur.

@dhruvkb
Copy link
Member Author

dhruvkb commented Nov 24, 2023

This could be related to #2612 and #2586.

@dhruvkb dhruvkb removed the javascript label Dec 2, 2023
@obulat obulat removed the help wanted Open to participation from the community label Apr 3, 2024
@obulat
Copy link
Contributor

obulat commented Apr 3, 2024

What is the best solution here, @WordPress/openverse-frontend ? Should we retry the request 2 (or 3 times) before displaying the error page? We recently stopped sending ERR_NETWORK errors to Sentry, sending them to Plausible instead. Would we send the event to Plausible with added attempt number property?

I removed "help wanted" label here because this issue is not actionable in the current state.

@sarayourfriend
Copy link
Collaborator

I can't find any example of this issue in Sentry from the last 90 days. @obulat can we close this instead? And if we think there is an issue with needing to retry requests, we can add some specific error handling to cover it.

Would #3721 have affected the visibility of this kind of error at all?

@obulat
Copy link
Contributor

obulat commented Apr 8, 2024

That's right, @sarayourfriend, #3850 (the updated version of #3721) has stopped the ERR_NETWORK from being sent to Sentry. The only exception is /related endpoint (the fix is in #4009)

And if we think there is an issue with needing to retry requests, we can add some specific error handling to cover it.

Since this error is not sent to Sentry anymore, I thought that this issue should handle the setting up of retries after a network error, based on @dhruvkb's note:

These errors must be handled with a certain number of retries followed by a message to the user regarding the error.

@sarayourfriend sarayourfriend changed the title Handle ERR_NETWORK error in Axios requests Retry ERR_NETWORK error in Axios requests Aug 20, 2024
@obulat obulat added ⌨️ tech: typescript Involves TypeScript and removed 🟨 tech: javascript Involves JavaScript labels Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend ⌨️ tech: typescript Involves TypeScript 🔧 tech: vue Involves Vue.js
Projects
Status: 📋 Backlog
Development

No branches or pull requests

5 participants