mali-onerror
Mali on error middleware. Calls function with error and context. The called function does not have access to control flow.
API
function
mali-onerror ⇒ Mali on error middleware. Calls function with error and context. The called function does not have access to control flow.
Returns: function
- the middleware function
Param | Type | Description |
---|---|---|
fn | function |
The function to call when an error occurs. Function has to have signature with signature (err, ctx) |
Example
const onError = { console} app
License
Apache-2.0