Function
Static Public Summary | ||
public |
handleError(opt: OptionErrors): * middleware in charge of handling errors thrown on purpose, either through manually throwing ErrorApp, either through calling Route.throw. |
Static Public
public handleError(opt: OptionErrors): * source
import handleError from 'koa-smart/src/middlewares/handleError.js'
middleware in charge of handling errors thrown on purpose, either through manually throwing ErrorApp, either through calling Route.throw.
It will also make sure errors pertaining to models as well as unexpected error are given a clearer message.
Params:
Name | Type | Attribute | Description |
opt | OptionErrors |
|
option object to set which events should be logged |
Return:
* |