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

update readme in the Handling Errors section - issue reference #5260 #5261

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

relbns
Copy link
Contributor

@relbns relbns commented Nov 12, 2022

Adding clarification to the Handling Errors section - issue reference #5260

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.

Copy link
Member

@jasonsaayman jasonsaayman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🚀

@jasonsaayman jasonsaayman merged commit a372b4c into axios:v1.x Nov 22, 2022
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

Successfully merging this pull request may close these issues.

2 participants