File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -826,8 +826,6 @@ impl AtomicCircuitBreaker for AtomicBool {
826826 }
827827
828828 fn check_err ( & self , e : & Error , callback : & CircuitBreakerTrippedCallback ) {
829- dbg ! ( e) ;
830-
831829 match e {
832830 Error :: ApiError {
833831 status : reqwest:: StatusCode :: TOO_MANY_REQUESTS ,
@@ -836,11 +834,17 @@ impl AtomicCircuitBreaker for AtomicBool {
836834 | Error :: TwirpError ( ClientError :: TwirpError ( TwirpErrorResponse {
837835 code : TwirpErrorCode :: ResourceExhausted ,
838836 ..
839- } ) ) => {
837+ } ) )
838+ | Error :: TwirpError ( ClientError :: HttpError {
839+ // The cache backend seems to give out this error for overload:
840+ // Twirp error: http error, status code: 502 Bad Gateway, msg:unknown error
841+ status : StatusCode :: BAD_GATEWAY ,
842+ ..
843+ } ) => {
840844 // meat is below
841845 }
842846 otherwise => {
843- tracing:: debug !( %otherwise, "Checked error for resource exhaustion, but it appears to be a different cause" ) ;
847+ tracing:: error !( %otherwise, "Checked error for resource exhaustion, but it appears to be a different cause" ) ;
844848 return ;
845849 }
846850 }
You can’t perform that action at this time.
0 commit comments