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

Use Axios validateStatus option to handle expectable API errors #158

Open
arildm opened this issue Apr 3, 2024 · 0 comments
Open

Use Axios validateStatus option to handle expectable API errors #158

arildm opened this issue Apr 3, 2024 · 0 comments

Comments

@arildm
Copy link
Member

arildm commented Apr 3, 2024

Mink-backend responds with error statuses (4xx, 5xx) in some cases that in the frontend are not seen as errors, for example:

  • /run-sparv and friends return 500 if the job cannot be started due to invalid data/config
  • /load-config returns 404 when corpus exists but there's no config file

Axios has a validateStatus option (see Handling Errors) that can be used to declaratively filter which status should be considered errors.

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

No branches or pull requests

1 participant