By convention, pass an Error
object passed to callback functions as the err parameter. In many cases, you can also pass a String.
For more information, see
- JavaScript Error object (Mozilla)
- Error Handling in Node.js (Joyent)
- What is the error object? (Nodejitsu)
The following table describes the properties of the error object.
Property | Type | Description |
---|---|---|
name | String | Name of the error. |
status | String | When the error occurs during an HTTP request, the HTTP status code. |
message | String | The error message. |