Skip to content

Commit 6ba9e80

Browse files
committed
Merge branch 'dev'
2 parents 17a80c2 + 6801e6d commit 6ba9e80

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,16 +1158,14 @@ app.post('/webhook', express.raw({ type: 'application/json' }), (req, res) => {
11581158
} catch (e) {
11591159
// `verifyWebhookEvent` method will throw an error if signature is invalid
11601160
console.log(e);
1161-
// Return a response to acknowledge receipt of the event so that ImageKit doesn't retry sending this webhook.
1162-
res.send()
1161+
res.status(400).send(`Webhook Error`);
11631162
}
11641163

11651164
const { timestamp, event } = webhookResult;
11661165

11671166
// Check if webhook has expired
11681167
if (timestamp + WEBHOOK_EXPIRY_DURATION < Date.now()) {
1169-
// Return a response to acknowledge receipt of the event so that ImageKit doesn't retry sending this webhook.
1170-
res.send()
1168+
res.status(400).send(`Webhook Error`);
11711169
}
11721170

11731171
// Handle webhook

0 commit comments

Comments
 (0)