Skip to content

Commit

Permalink
Document error object in shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
geek committed Mar 23, 2017
1 parent 1544728 commit fc09382
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ Convenience method for GET operations.
- `options` - Optional config object containing settings for both `request` and
`read` operations.
- `callback` - The callback function using the signature `function (err, response, payload)` where:
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `isResponseError` - boolean, indicates if the error is a result of an error response status code
- `headers` - object containing the response headers
- `payload` - the payload in the form of a Buffer or as a parsed object
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)
object, which is a readable stream that has "ended" and contains no more data to read.
- `payload` - The payload in the form of a Buffer or (optionally) parsed JavaScript object (JSON).
Expand All @@ -162,7 +165,10 @@ Convenience method for POST operations.
- `options` - Optional config object containing settings for both `request` and
`read` operations.
- `callback` - The callback function using the signature `function (err, response, payload)` where:
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `isResponseError` - boolean, indicates if the error is a result of an error response status code
- `headers` - object containing the response headers
- `payload` - the payload in the form of a Buffer or as a parsed object
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)
object, which is a readable stream that has "ended" and contains no more data to read.
- `payload` - The payload in the form of a Buffer or (optionally) parsed JavaScript object (JSON).
Expand All @@ -176,7 +182,10 @@ Convenience method for PATCH operations.
- `options` - Optional config object containing settings for both `request` and
`read` operations.
- `callback` - The callback function using the signature `function (err, response, payload)` where:
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `isResponseError` - boolean, indicates if the error is a result of an error response status code
- `headers` - object containing the response headers
- `payload` - the payload in the form of a Buffer or as a parsed object
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)
object, which is a readable stream that has "ended" and contains no more data to read.
- `payload` - The payload in the form of a Buffer or (optionally) parsed JavaScript object (JSON).
Expand All @@ -191,7 +200,10 @@ Convenience method for PUT operations.
- `options` - Optional config object containing settings for both `request` and
`read` operations.
- `callback` - The callback function using the signature `function (err, response, payload)` where:
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `isResponseError` - boolean, indicates if the error is a result of an error response status code
- `headers` - object containing the response headers
- `payload` - the payload in the form of a Buffer or as a parsed object
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)
object, which is a readable stream that has "ended" and contains no more data to read.
- `payload` - The payload in the form of a Buffer or (optionally) parsed JavaScript object (JSON).
Expand All @@ -206,7 +218,10 @@ Convenience method for DELETE operations.
- `options` - Optional config object containing settings for both `request` and
`read` operations.
- `callback` - The callback function using the signature `function (err, response, payload)` where:
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `isResponseError` - boolean, indicates if the error is a result of an error response status code
- `headers` - object containing the response headers
- `payload` - the payload in the form of a Buffer or as a parsed object
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)
object, which is a readable stream that has "ended" and contains no more data to read.
- `payload` - The payload in the form of a Buffer or (optionally) parsed JavaScript object (JSON).
Expand Down

0 comments on commit fc09382

Please sign in to comment.