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

Adding clarification to the Handling Errors section #5260

Closed
relbns opened this issue Nov 12, 2022 · 1 comment
Closed

Adding clarification to the Handling Errors section #5260

relbns opened this issue Nov 12, 2022 · 1 comment

Comments

@relbns
Copy link
Contributor

relbns commented Nov 12, 2022

Section/Content To Improve

https://github.com/relbns/axios#handling-errors

Suggested Improvement

add a sentence about the default behavior of the rejected status code.

"the default behavior is to reject every response that returns with a status code that falls out of the range of 2xx and treat it as an error."

and make a small addition to the validateStatus header, to explain what the default condition.

Using the validateStatus config option, you can override the default condition (status >= 200 && status < 300) and define HTTP code(s) that should throw an error.

Relevant File(s)

READEME.md
@relbns
Copy link
Contributor Author

relbns commented Nov 14, 2022

pr ref: #5261

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

No branches or pull requests

2 participants