]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🔊 Fix empty log message in docs example about raised exceptions (#1815)
authormanlix <manlix@yandex.ru>
Sun, 9 Aug 2020 11:10:33 +0000 (14:10 +0300)
committerGitHub <noreply@github.com>
Sun, 9 Aug 2020 11:10:33 +0000 (13:10 +0200)
docs_src/handling_errors/tutorial006.py

index 8cabc9c24b47bd638647060ce991295ce92f221e..e05160d7e167f5e8135bd3bb1f3f7cc25a3ba8eb 100644 (file)
@@ -11,7 +11,7 @@ app = FastAPI()
 
 @app.exception_handler(StarletteHTTPException)
 async def custom_http_exception_handler(request, exc):
-    print(f"OMG! An HTTP error!: {exc}")
+    print(f"OMG! An HTTP error!: {repr(exc)}")
     return await http_exception_handler(request, exc)