Skip to content

Commit 6355d92

Browse files
authored
Merge pull request #623 from MerginMaps/develop
Finalization of 2026.4.0
2 parents a9b93c2 + 1b65c10 commit 6355d92

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

server/mergin/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,10 @@ def handle_exception(e):
389389
def log_bad_request(response):
390390
"""Log bad requests for easier debugging"""
391391
if response.status_code == 400:
392-
if response.json.get("detail"):
392+
json_body = response.get_json(silent=True)
393+
if json_body and json_body.get("detail"):
393394
# default response from connexion (check against swagger.yaml)
394-
logging.warning(f'HTTP 400: {response.json["detail"]}')
395+
logging.warning(f'HTTP 400: {json_body["detail"]}')
395396
else:
396397
# either WTF form validation error or custom validation with abort(400)
397398
logging.warning(f"HTTP 400: {response.data}")

0 commit comments

Comments
 (0)