diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/index.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/index.ts b/services/index.ts index 8d77429..bdce04f 100644 --- a/services/index.ts +++ b/services/index.ts @@ -7,6 +7,7 @@ import Auth from './auth/auth.service'; import tryAuthenticate from '../hooks/tryAuthenticate'; import logging from '../hooks/logging'; +import handleErrors from '../hooks/handleErrors'; export default (app: Application): void => { app.configure(Auth); @@ -17,10 +18,10 @@ export default (app: Application): void => { app.hooks({ before: { - all: tryAuthenticate + all: [tryAuthenticate, logging] }, - after: { - all: logging + error: { + all: handleErrors } }); }; |