Skip to content

Commit

Permalink
fix: log error cause + created changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Nov 22, 2023
1 parent 5d5fc43 commit e7e2c3d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .changeset/rude-jobs-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@personalhealthtrain/server-api": patch
"@personalhealthtrain/client-ui": patch
"@personalhealthtrain/client-vue": patch
"@personalhealthtrain/core": patch
"@personalhealthtrain/server-core": patch
"@personalhealthtrain/server-realtime": patch
"@personalhealthtrain/server-train-manager": patch
---

log error cause
4 changes: 4 additions & 0 deletions packages/server-api/src/http/middleware/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export function registerErrorHandler(router: Router) {

if (isServerError || error.logMessage) {
useLogger().error(error);

if (error.cause) {
useLogger().error(error.cause);
}
}

if (isServerError) {
Expand Down

0 comments on commit e7e2c3d

Please sign in to comment.