From 6d5ae3c9ef023b90333f9a892f8ee1c6f71a148b Mon Sep 17 00:00:00 2001 From: Matthias Van Parijs Date: Sat, 2 Nov 2024 08:59:50 +0100 Subject: [PATCH] chore: Log errors for API --- packages/api/src/errors.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/api/src/errors.ts b/packages/api/src/errors.ts index 402f4c29..2a9d8729 100644 --- a/packages/api/src/errors.ts +++ b/packages/api/src/errors.ts @@ -61,6 +61,8 @@ export const errors = () => DELIBERATE_ERROR: DeliberateError, }) .onError({ as: "global" }, ({ code, error, set }) => { + console.error(error); + if (code === "DELIBERATE_ERROR") { set.status = statusMap[error.type]; return {