from typing import Awaitable, Callable import fastapi from .exceptions import UnauthorizedException ErrorHandler = Callable[ [fastapi.Request, UnauthorizedException], Awaitable[fastapi.responses.JSONResponse] ]