diff --git a/src/flask/typing.py b/src/flask/typing.py index 66bc0a54ee..a8c9ba0425 100644 --- a/src/flask/typing.py +++ b/src/flask/typing.py @@ -77,7 +77,10 @@ # https://github.com/pallets/flask/issues/4095 # https://github.com/pallets/flask/issues/4295 # https://github.com/pallets/flask/issues/4297 -ErrorHandlerCallable = t.Callable[[t.Any], ResponseReturnValue] +ErrorHandlerCallable = t.Union[ + t.Callable[[t.Any], ResponseReturnValue], + t.Callable[[t.Any], t.Awaitable[ResponseReturnValue]], +] RouteCallable = t.Union[ t.Callable[..., ResponseReturnValue],