File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -389,13 +389,16 @@ def handle_exception(e):
389389 def log_bad_request (response ):
390390 """Log bad requests for easier debugging"""
391391 if response .status_code == 400 :
392- json_body = response .get_json (silent = True )
393- if json_body and json_body .get ("detail" ):
394- # default response from connexion (check against swagger.yaml)
395- logging .warning (f'HTTP 400: { json_body ["detail" ]} ' )
392+ if "xml" in response .content_type :
393+ pass # QGIS proxy errors are already logged at the source
396394 else :
397- # either WTF form validation error or custom validation with abort(400)
398- logging .warning (f"HTTP 400: { response .data } " )
395+ json_body = response .get_json (silent = True )
396+ if json_body and json_body .get ("detail" ):
397+ # default response from connexion (check against swagger.yaml)
398+ logging .warning (f'HTTP 400: { json_body ["detail" ]} ' )
399+ else :
400+ # either WTF form validation error or custom validation with abort(400)
401+ logging .warning (f"HTTP 400: { response .data } " )
399402 elif response .status_code == 409 :
400403 # request which would result in conflict, e.g. creating the same project again
401404 logging .warning (f"HTTP 409: { response .data } " )
You can’t perform that action at this time.
0 commit comments