Constructor
new HttpError(response, body, …args)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
response |
Response |
the |
|
body |
Object | String |
the body of the response |
|
args |
any |
<repeatable> |
further arguments to pass to |
- Source:
Members
body :Object|String
The content returned by the server. If the response has a Content-Type
header of application/json
, then body
will be parsed into a JavaScript
object. Otherwise, body
will be a string representing the content
returned by the server.
- Source:
error :String|null
An error message returned by the server. For convenience, error
will be
the value of body.error
, or null
if body.error
is falsy.
- Source:
extra :Object
Get an "extra" object: a JSON-encodeable object that can be sent to Sentry
- Source:
response :Response
The fetch
Response
object, which can be useful for low-level
operations. Note that the body stream will be locked.
statusCode :Number
The HTTP Status Code returned by the server (ie. 401, 404, 500, etc.)
- Source: