From 479f0ed05102967a582c12f0e8049529eb395160 Mon Sep 17 00:00:00 2001 From: David Fong <42986768+david-fong@users.noreply.github.com> Date: Thu, 8 Jan 2026 16:00:45 -0800 Subject: [PATCH] make type annotation for HTTPException.detail be Any https://fastapi.tiangolo.com/tutorial/handling-errors/#fastapis-httpexception-vs-starlettes-httpexception --- fastapi/exceptions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fastapi/exceptions.py b/fastapi/exceptions.py index 1a3abd80c..773b83857 100644 --- a/fastapi/exceptions.py +++ b/fastapi/exceptions.py @@ -41,6 +41,7 @@ class HTTPException(StarletteHTTPException): return {"item": items[item_id]} ``` """ + detail: Any def __init__( self,