Skip to content

Commit

Permalink
return correct error code in the response info as well
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanklut committed Jul 11, 2024
1 parent e3e4816 commit 89fd1b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/flask_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def abort_with_info(
if info is None:
info = ResponseInfo(status_code=status_code) # type: ignore
info["error_message"] = error_message
info["status_code"] = status_code
response = jsonify(info)
response.status_code = status_code
abort(response)
Expand Down

0 comments on commit 89fd1b0

Please sign in to comment.