File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def format_headers(headers_dict):
112112 raise APIInsufficientQuota (status_code = 429 )
113113 if response .status_code == 502 :
114114 log .error (f"Upstream server error{ path_str } { headers_str } " )
115- raise APIBadGateway (status_code = 502 )
115+ raise APIBadGateway ()
116116 if response .status_code >= 400 :
117117 try :
118118 error_json = response .json ()
Original file line number Diff line number Diff line change @@ -76,5 +76,5 @@ def is_transient_error(self) -> bool:
7676class APIBadGateway (APIFailure ):
7777 """Raised when the upstream server returns a 502 Bad Gateway error"""
7878
79- def __init__ (self , * args , status_code : Optional [ int ] = 502 ):
80- super ().__init__ (* args , status_code = status_code )
79+ def __init__ (self , * args ):
80+ super ().__init__ (* args , status_code = 502 )
You can’t perform that action at this time.
0 commit comments