Skip to content

Commit fb1f65c

Browse files
authored
chore(logs): print non enumerable message and stack when logging unexpected errors (#526)
1 parent 2392897 commit fb1f65c

3 files changed

Lines changed: 5 additions & 113 deletions

File tree

src/common/http-exception-filter-extended.exception.spec.ts

Lines changed: 0 additions & 81 deletions
This file was deleted.

src/common/http-exception-filter-extended.exception.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/common/http-global-exception-filter.exception.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ export class HttpGlobalExceptionFilter extends BaseExceptionFilter {
5353
id: request?.user?.id,
5454
},
5555
client: getClientIdFromHeaders(request),
56-
error: exception,
56+
error: {
57+
message: exception.message,
58+
stack: exception.stack,
59+
exception,
60+
},
5761
};
5862

5963
let errorSubtype = '';

0 commit comments

Comments
 (0)