Skip to content

Commit

Permalink
main - handle faapi.exceptions.NotFound explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Sep 24, 2024
1 parent f5ec2b4 commit 976cd84
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def handle_notice_message(_request: Request, err: Exception | faapi.exceptions.P
# noinspection PyTypeChecker
@app.exception_handler(faapi.exceptions.ServerError)
@app.exception_handler(faapi.exceptions.DisabledAccount)
@app.exception_handler(faapi.exceptions.NotFound)
def handle_server_error(_request: Request, err: faapi.exceptions.ParsingError):
return handle_http_exception(_request, NotFound([err.__class__.__name__, *err.args[0:1]]))

Expand Down

0 comments on commit 976cd84

Please sign in to comment.