Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

return res

Carl-Gerhard Lindesvärd1afec0a5c2a3
diff --git a/apps/web/src/server/exceptions.ts b/apps/web/src/server/exceptions.ts
index be46d38dd..a1d4895b5 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());
}