From 0092f7c5ba1a0a298601ee30940dac33d3d9b739 Mon Sep 17 00:00:00 2001 From: Matthew Robertson Date: Thu, 19 Dec 2024 23:19:02 +0000 Subject: [PATCH] fix: do not call render in the errorHandler --- src/logger.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/logger.ts b/src/logger.ts index 9c0277fd..b09416be 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -99,8 +99,7 @@ export const errorHandler = ( next: express.NextFunction // eslint-disable-line @typescript-eslint/no-unused-vars ) => { interceptStderrWrite(); - res.status(500); - res.render('error', {error: err}); + sendCrashResponse({err, res}); }; // eslint-disable-next-line @typescript-eslint/no-explicit-any