Why Axios throws exceptions for status code not equal to 200? #5818
stefanodecillis
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As in the title of the discussion, why Axios throws exceptions in this way? With this approach, we need to catch each status not equal to 200. Usually, the mapping of status codes for responses should not be handled by the http client. The application should do it. Moreover, Exceptions are really important when developing the application and catching random exceptions makes no sense (always in my opinion). I see this behavior as an abuse of exceptions
Beta Was this translation helpful? Give feedback.
All reactions