Skip to content

Commit

Permalink
chore: Log errors for API
Browse files Browse the repository at this point in the history
  • Loading branch information
matvp91 committed Nov 2, 2024
1 parent d57fc75 commit 6d5ae3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/api/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6d5ae3c

Please sign in to comment.