sentry: skip "no pubkey provided" error
This commit is contained in:
parent
9ecf5db1b1
commit
f651bf416a
15
src/app.ts
15
src/app.ts
|
@ -111,16 +111,15 @@ const app = new Hono<AppEnv>();
|
||||||
|
|
||||||
if (Conf.sentryDsn) {
|
if (Conf.sentryDsn) {
|
||||||
// @ts-ignore Mismatched hono types.
|
// @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');
|
const debug = Debug('ditto:http');
|
||||||
|
|
||||||
app.use('/api/*', logger(debug));
|
app.use('/api/*', logger(debug));
|
||||||
|
|
Loading…
Reference in New Issue