Add on-error hook (#4233)

* Add on-error hook

Closes #2906

* Ignore unspecified listeners

* Document error hook
This commit is contained in:
Rijk van Zanten
2021-02-22 19:00:53 -05:00
committed by GitHub
parent f87cbb5824
commit 0beaf56dc3
3 changed files with 14 additions and 3 deletions

View File

@@ -81,8 +81,9 @@ module.exports = function registerHook({ exceptions }) {
| `middlewares.init` | `before` and `after` | No |
| `request` | `not_found` | No |
| `response` | | No† |
| `items` | `create`, `update` and `delete` | Optional |
| `error` | | No |
| `auth` | `success`†, `fail`† and `refresh`† | No |
| `items` | `create`, `update` and `delete` | Optional |
| `activity` | `create`, `update` and `delete` | Optional |
| `collections` | `create`, `update` and `delete` | Optional |
| `fields` | `create`, `update` and `delete` | Optional |