Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

#5261
Merged
jasonsaayman merged 1 commit into
axios:v1.xaxios/axios:v1.xfrom
relbns:validateStatus-readme-updaterelbns/axios:validateStatus-readme-updateCopy head branch name to clipboard
Nov 22, 2022
Merged

update readme in the Handling Errors section - issue reference #5260#5261
jasonsaayman merged 1 commit into
axios:v1.xaxios/axios:v1.xfrom
relbns:validateStatus-readme-updaterelbns/axios:validateStatus-readme-updateCopy head branch name to clipboard

Conversation

@relbns

@relbns relbns commented Nov 12, 2022

Copy link
Copy Markdown
Contributor

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.

@jasonsaayman jasonsaayman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks 🚀

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.