Skip to content

Commit 795bf79

Browse files
committed
Adjusted exception handler docstring
1 parent 9523062 commit 795bf79

File tree

1 file changed

+3
-3
lines changed
  • src/ghga_service_commons/httpyexpect/server/handlers

1 file changed

+3
-3
lines changed

src/ghga_service_commons/httpyexpect/server/handlers/fastapi_.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ def unhandled_exception_handler(
5050
# (The above is required by the corresponding FastAPI interface but not used here)
5151
exc: HttpException,
5252
) -> JSONResponse:
53-
"""Attach a custom exception handler to the FastAPI app.
53+
"""Attach a custom 500 exception handler to the FastAPI app.
5454
55-
The custom exception handler translates httpyexpect's HttpExceptions
56-
into a FastAPI JSONResponse.
55+
This exception handler should properly wrap unhandled exceptions so they only
56+
propagate a generic message instead of carrying the actual exception message.
5757
"""
5858
return JSONResponse(
5959
status_code=500, content={"message": "Internal Server Error."}

0 commit comments

Comments
 (0)