sentry: skip "no pubkey provided" error

This commit is contained in:
Alex Gleason 2024-04-30 12:52:20 -05:00
parent 9ecf5db1b1
commit f651bf416a
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 7 additions and 8 deletions

View File

@ -111,16 +111,15 @@ const app = new Hono<AppEnv>();
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));