8000 Axios errors are not handled anymore · Issue #1617 · tchiotludo/akhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Axios errors are not handled anymore #1617

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

Closed
AlexisSouquiere opened this issue Nov 29, 2023 · 0 comments · Fixed by #1620
Closed

Axios errors are not handled anymore #1617

AlexisSouquiere opened this issue Nov 29, 2023 · 0 comments · Fixed by #1620

Comments

@AlexisSouquiere
Copy link
Collaborator
AlexisSouquiere commented Nov 29, 2023

In #1601, axios validateStatus has been set to true for all the requests (see here) which means that all the HTTP codes shouldn't throw an error (even 4xx, 5xx).

It means that the common errors management doesn't work anymore because errors won't go through the axios.catch() and then to handleError in api.js (displaying toast warns or errors). Response will go thought .then() like if the request succeded (like this).

Moreover I saw an issue that prevented 401 errors to redirect to the login page (see here). err.status should be err.response.status

I will provide a fix quickly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant
0