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

Clarify docs for got.HTTPError #1244

Merged
merged 3 commits into from
May 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ const got = require('got');
Type: `boolean`\
Default: `true`

Determines if a `got.HTTPError` is thrown for error responses (non-2xx status codes).
Determines if a [`got.HTTPError`](#gothttperror) is thrown for unsuccessful responses.

If this is disabled, requests that encounter an error status code will be resolved with the `response` instead of throwing. This may be useful if you are checking for resource availability and are expecting error responses.

Expand Down Expand Up @@ -1302,7 +1302,7 @@ When server response code is 2xx, and parsing body fails. Includes a `response`

#### got.HTTPError

When the server response code is not 2xx. Includes a `response` property.
When the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304. Includes a `response` property.

#### got.MaxRedirectsError

Expand Down