Translate error messages to errorcodes.
Function to add status field to an error to be used with express.
Deprecated
Add the status to an error.
Kind: inner method of errorcode
Returns: Error
- error with the status.
Throws:
- Error when missing any argument.
Param | Type | Description |
---|---|---|
status | number |
http status code. |
error | Error |
the error which the status will be appended. |
Adds the current object to the dictionary
Kind: inner method of errorcode
Param | Type | Description |
---|---|---|
object | object |
mapping a message to an errorcode |
Gets the error code for the first word of the error message or 500
Kind: inner method of errorcode
Param | Type | Description |
---|---|---|
error | object |
with message |