From f651bf416ad04a882dc382c938f8f4afac3a77ad Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 30 Apr 2024 12:52:20 -0500 Subject: [PATCH] sentry: skip "no pubkey provided" error --- src/app.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/app.ts b/src/app.ts index c759be3c..7eaec98e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -111,16 +111,15 @@ const app = new Hono(); if (Conf.sentryDsn) { // @ts-ignore Mismatched hono types. - app.use('*', sentryMiddleware({ dsn: Conf.sentryDsn })); + app.use( + '*', + sentryMiddleware({ + dsn: Conf.sentryDsn, + ignoreErrors: ['No pubkey provided'], + }), + ); } -app.onError((err) => { - if (err instanceof HTTPException) { - return err.getResponse(); - } - throw err; -}); - const debug = Debug('ditto:http'); app.use('/api/*', logger(debug));