File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ use OAuth, they are not available on the `client` object.
338338
339339## Error Handling
340340
341- With the exception of the OAuth calls, errors will returned that are
341+ Except for the OAuth calls, errors will returned that are
342342` instanceof ` ` StatusCodeError ` when the HTTP status code is not 2xx. In the
343343Promise-based API, the promise will be rejected. An error of type
344344` RequestError ` will be returned if the request fails for technical reasons.
@@ -357,6 +357,14 @@ Example error checking:
357357 }
358358` ` `
359359
360+ The ` StatusCodeError` object includes extra properties to help with debugging:
361+
362+ - ` name` is always ` StatusCodeError`
363+ - ` statusCode` contains the HTTP status code
364+ - ` message` Contains the body of the response.
365+ - ` options` Contains the ` option` used in the request
366+ - ` response` Contains the response object
367+
360368## Development
361369
362370This package includes a full test suite runnable via ` yarn test` .
You can’t perform that action at this time.
0 commit comments