Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
feat: logging hooks errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau committed Jun 19, 2020
1 parent 44b65a2 commit 020edf9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ export async function appFactory (): Promise<Application> {
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)
Expand Down

0 comments on commit 020edf9

Please sign in to comment.