From cc1e2d7a2fab4a1235eb1132ebd53997e98763b1 Mon Sep 17 00:00:00 2001 From: rijenkii Date: Tue, 19 Nov 2024 02:00:58 +0700 Subject: [PATCH] Replace `dict` by `Mapping` on `HTTPException.headers` (#2749) --- starlette/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starlette/exceptions.py b/starlette/exceptions.py index bd3352eb0..c48f0838a 100644 --- a/starlette/exceptions.py +++ b/starlette/exceptions.py @@ -12,7 +12,7 @@ def __init__( self, status_code: int, detail: str | None = None, - headers: dict[str, str] | None = None, + headers: typing.Mapping[str, str] | None = None, ) -> None: if detail is None: detail = http.HTTPStatus(status_code).phrase