replace early returns with NotFoundError

test /api/webhook/incoming-message
This commit is contained in:
m5r
2021-08-02 21:43:27 +08:00
parent 827ed9f1c0
commit 2cf53533a3
11 changed files with 223 additions and 28 deletions

View File

@ -47,7 +47,7 @@ const notifyIncomingMessageQueue = Queue<Payload>(
} catch (error) {
logger.error(error);
if (error instanceof WebPushError) {
// subscription most likely expired
// subscription most likely expired or has been revoked
await db.notificationSubscription.delete({ where: { id: subscription.id } });
}
}