Skip to content

Commit

Permalink
Clarify docs for got.HTTPError (#1244)
Browse files Browse the repository at this point in the history
* Clarify docs for got.HTTPError

* Update readme.md

Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com>

* No special term and don't change ParseError

Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com>
  • Loading branch information
chinesedfan and szmarczak committed May 10, 2020
1 parent ece94ed commit 3f125f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
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

0 comments on commit 3f125f1

Please sign in to comment.