fix: tighten edge cases across services (#3158)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-03 13:04:29 +02:00
1 parent a9f7a23c0d
commit 4e6b837ccc
170 files changed
+2028 -421

No files matched your search

@@ -89,6 +89,17 @@ describe('AppErrorHandler logging', () => {
expect(details.status).toBe(400);
});
it('logs the matched route pattern instead of the request path', async () => {
const app = createApp();
app.get('/reset/:token', () => {
throw new ServiceUnavailableError({message: 'unavailable'});
});
const response = await app.request('/reset/abc123');
expect(response.status).toBe(503);
expect(logCalls.error).toHaveLength(1);
expect(logCalls.error[0]![0].path).toBe('/reset/:token');
});
it('still reports unexpected errors as unhandled', async () => {
const app = createApp();
app.get('/thing', () => {