File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use crate::handlers::Context;
12
12
use crate :: handlers:: docs_update:: docs_update;
13
13
use crate :: handlers:: pr_tracking:: get_assigned_prs;
14
14
use crate :: handlers:: project_goals:: { self , ping_project_goals_owners} ;
15
- use crate :: utils:: { AppError , pluralize} ;
15
+ use crate :: utils:: pluralize;
16
16
use crate :: zulip:: api:: { MessageApiResponse , Recipient } ;
17
17
use crate :: zulip:: client:: ZulipClient ;
18
18
use crate :: zulip:: commands:: {
@@ -107,7 +107,19 @@ pub async fn webhook(
107
107
} )
108
108
. into_response ( ) ,
109
109
Ok ( Some ( content) ) => Json ( Response { content } ) . into_response ( ) ,
110
- Err ( e) => AppError :: from ( e) . into_response ( ) ,
110
+ Err ( err) => {
111
+ // We are mixing network errors and "logic" error (like clap errors)
112
+ // so don't return a 500. Long term we should decouple those.
113
+
114
+ // Log the full error
115
+ tracing:: error!( ?err) ;
116
+
117
+ // Reply with a 200 and reply only with outermost error
118
+ Json ( Response {
119
+ content : err. to_string ( ) ,
120
+ } )
121
+ . into_response ( )
122
+ }
111
123
}
112
124
}
113
125
You can’t perform that action at this time.
0 commit comments