From 1afec0a5c2a3c32ab9a5864b66696be1c8eb47da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Thu, 2 Nov 2023 15:06:21 +0100 Subject: [PATCH] return res --- apps/web/src/server/exceptions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/server/exceptions.ts b/apps/web/src/server/exceptions.ts index be46d38d..a1d4895b 100644 --- a/apps/web/src/server/exceptions.ts +++ b/apps/web/src/server/exceptions.ts @@ -51,9 +51,9 @@ export function handleError(res: NextApiResponse, error: unknown) { if (error instanceof Error) { const httpError = createError(500, error); - res.status(httpError.status).json(httpError.toJson()); + return res.status(httpError.status).json(httpError.toJson()); } const httpError = createError(500, error); - res.status(httpError.status).json(httpError.toJson()); + return res.status(httpError.status).json(httpError.toJson()); }