feat: log unhandled errors and pretty dev output (WealthLedger/backend#120)
Backend verify / commits (pull_request) Successful in 37s
Backend verify / security (pull_request) Successful in 15s
Backend verify / verify (pull_request) Failing after 3m40s

This commit is contained in:
2026-10-20 21:44:20 +03:00
parent b20080ac85
commit e3e12260ce
8 changed files with 193 additions and 11 deletions
+11 -2
View File
@@ -554,8 +554,17 @@ describe('Authentication (e2e)', () => {
expect(body).toEqual({ status: 500, code: 'INTERNAL_SERVER_ERROR' }),
);
const completed = logs.filter((entry) => entry.requestId === response.headers['x-request-id']);
expect(completed).toEqual([
const related = logs.filter((entry) => entry.requestId === response.headers['x-request-id']);
expect(related).toEqual([
expect.objectContaining({
requestId: response.headers['x-request-id'],
clientRequestId,
code: 'INTERNAL_SERVER_ERROR',
level: 50,
message: 'http.request.unhandled',
errorName: 'Error',
errorStack: expect.stringContaining(' at ') as unknown,
}),
expect.objectContaining({
requestId: response.headers['x-request-id'],
clientRequestId,