feat: log unhandled errors and pretty dev output (WealthLedger/backend#120) #126

Merged
codex-bot merged 5 commits from chore/121-linear-ci into develop 2026-10-24 15:06:34 +03:00
Showing only changes of commit 678b456aa3 - Show all commits
+11 -2
View File
@@ -539,7 +539,14 @@ describe('Authentication (e2e)', () => {
'X-Request-ID',
);
expect(logs.filter((entry) => entry.requestId === response.headers['x-request-id'])).toEqual([
expect.objectContaining({ level: 40, message: 'http.request.completed', status: 401, code: 'UNAUTHORIZED' }),
expect.objectContaining({
level: 40,
message: 'http.request.completed',
method: 'GET',
route: '/api/v1/auth/me',
status: 401,
code: 'UNAUTHORIZED',
}),
]);
});
@@ -561,7 +568,9 @@ describe('Authentication (e2e)', () => {
expect(body).toEqual({ status: 500, code: 'INTERNAL_SERVER_ERROR' }),
);
const related = logs.filter((entry) => entry.requestId === response.headers['x-request-id']);
const related = logs.filter((entry) =>
entry.requestId === response.headers['x-request-id'] || entry.clientRequestId === clientRequestId,
);
expect(related).toEqual([
expect.objectContaining({
requestId: response.headers['x-request-id'],