File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1407,8 +1407,22 @@ export class Controller {
1407
1407
throw new ServerError ( 501 , 'Webhook verification not implemented' ) ;
1408
1408
}
1409
1409
1410
- const verified = await this . adapter . verifyWebhookRequest ( req ) ;
1410
+ let verified : boolean ;
1411
+
1412
+ try {
1413
+ verified = await this . adapter . verifyWebhookRequest ( req ) ;
1414
+ } catch ( error ) {
1415
+ errorLogger (
1416
+ 'handleWebhook' ,
1417
+ 'Error while verifying webhook request:' ,
1418
+ '' ,
1419
+ error || 'Unknown' ,
1420
+ ) ;
1421
+ throw new ServerError ( 403 , 'Webhook verification failed' ) ;
1422
+ }
1423
+
1411
1424
if ( ! verified ) {
1425
+ errorLogger ( 'handleWebhook' , 'Webhook verification failed' , '' ) ;
1412
1426
throw new ServerError ( 403 , 'Webhook verification failed' ) ;
1413
1427
}
1414
1428
You can’t perform that action at this time.
0 commit comments