Skip to content

Commit

Permalink
feat: sending webhook zod error to sentry
Browse files Browse the repository at this point in the history
because we want to know
  • Loading branch information
alanlr committed Dec 14, 2023
1 parent af41f1d commit 03dce95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/http/middlewares/errorMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function errorMiddleware(server: Server) {
...(error.data ? { data: error.data } : {}),
}

if (error.output.statusCode >= 500) {
if (error.output.statusCode >= 500 || (_request.url.startsWith("/api/emails/webhook") && error.output.statusCode >= 400)) {
server.log.error(rawError)
captureException(rawError)
}
Expand Down

0 comments on commit 03dce95

Please sign in to comment.