ServiceAuthorizationError
ServiceAuthorizationError
new ServiceAuthorizationError(args)
Param | Type | Default | Description |
args |
| Required - The args object passed to the constructor | |
args.publicData |
| Required - Data to show in the error | |
args.internalData |
| Required - Private data that can be logged in the error | |
args.publicMessage |
|
| Error message to be shown |
args.httpCode |
|
| Http status code for error |
hapiReply(replyOrResponseToolkit, [extraPublicData]) ⇒ Object
Object
Reply function to respond with the error
Returns: Object
- Response - Response object
Param | Type | Default | Description |
replyOrResponseToolkit |
| Required - Response toolkit - For example 'h' in Hapi, which handles the response | |
extraPublicData |
|
| Extra public data to shown in the error message |
Last updated