diff --git a/src/app.ts b/src/app.ts index 3eac5b97..3e6a0e65 100644 --- a/src/app.ts +++ b/src/app.ts @@ -53,6 +53,13 @@ export async function appFactory (): Promise { app.configure(express.rest()) app.configure(socketio()) + // Log errors in hooks + app.hooks({ + error (context) { + logger.error(`Error in '${context.path}' service method '${context.method}'`, context.error.stack) + } + }) + // Custom general services app.configure(sequelize) app.configure(blockchain)