fix(api): send captured errors to Sentry. (#55877)
parent
3bc0bda634
commit
eba0f1ef9b
|
@ -233,7 +233,7 @@ export const protectedCertificateRoutes: FastifyPluginCallbackTypebox = (
|
|||
await fastify.sendEmail(notifyUser);
|
||||
} catch (e) {
|
||||
fastify.log.error(e);
|
||||
// TODO: Log to Sentry
|
||||
fastify.Sentry.captureException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -105,6 +105,7 @@ export const donateRoutes: FastifyPluginCallbackTypebox = (
|
|||
} as const;
|
||||
} catch (error) {
|
||||
fastify.log.error(error);
|
||||
fastify.Sentry.captureException(error);
|
||||
void reply.code(500);
|
||||
return {
|
||||
type: 'danger',
|
||||
|
@ -231,6 +232,7 @@ export const donateRoutes: FastifyPluginCallbackTypebox = (
|
|||
});
|
||||
} catch (error) {
|
||||
fastify.log.error(error);
|
||||
fastify.Sentry.captureException(error);
|
||||
void reply.code(500);
|
||||
return reply.send({
|
||||
error: 'Donation failed due to a server error.'
|
||||
|
|
Loading…
Reference in New Issue