From 3d2c911652716712554c8639cf2db2c47db7c4f2 Mon Sep 17 00:00:00 2001 From: Antoine Arlaud Date: Thu, 30 May 2024 11:09:39 +0200 Subject: [PATCH] fix: [server only] stop secondary to primary fwd flow on err --- lib/server/routesHandlers/httpRequestHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server/routesHandlers/httpRequestHandler.ts b/lib/server/routesHandlers/httpRequestHandler.ts index d05295dda..336aa58fd 100644 --- a/lib/server/routesHandlers/httpRequestHandler.ts +++ b/lib/server/routesHandlers/httpRequestHandler.ts @@ -56,7 +56,7 @@ export const overloadHttpRequestWithConnectionDetailsMiddleware = async ( return httpResponse.pipe(res); } catch (err) { logger.error({ err }, `Error in HTTP middleware: ${err}`); - res.status(500).send('Error forwarding request to primary'); + return res.status(500).send('Error forwarding request to primary.'); } } else { logger.warn({ desensitizedToken }, 'no matching connection found');