File tree Expand file tree Collapse file tree 1 file changed +18
-11
lines changed Expand file tree Collapse file tree 1 file changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -780,17 +780,24 @@ async function handler(request, context) {
780
780
781
781
context . log ( `Processing comment ${ comment . id } on ${ isPr ? "PR" : "issue" } ${ issueNumber } by ${ comment . user . login } (${ comment . author_association } )` )
782
782
783
- await webhook ( {
784
- // The azure functions logger is a getter and crashes if passed directly
785
- log : ( s ) => context . log ( s ) ,
786
- issueNumber,
787
- commentId : comment . id ,
788
- commentBody : comment . body ,
789
- commentIsFromIssue,
790
- isPr,
791
- commentUser : comment . user . login ,
792
- authorAssociation : comment . author_association ,
793
- } ) ;
783
+ try {
784
+ await webhook ( {
785
+ // The azure functions logger is a getter and crashes if passed directly
786
+ log : ( s ) => context . log ( s ) ,
787
+ issueNumber,
788
+ commentId : comment . id ,
789
+ commentBody : comment . body ,
790
+ commentIsFromIssue,
791
+ isPr,
792
+ commentUser : comment . user . login ,
793
+ authorAssociation : comment . author_association ,
794
+ } ) ;
795
+ } catch ( e ) {
796
+ context . log ( `Error processing comment: ${ e } ` ) ;
797
+ return {
798
+ status : 500 ,
799
+ } ;
800
+ }
794
801
795
802
return { } ;
796
803
}
You can’t perform that action at this time.
0 commit comments