diff --git a/supertokens_python/recipe/session/framework/fastapi/__init__.py b/supertokens_python/recipe/session/framework/fastapi/__init__.py index 16d660943..e1b1c4e48 100644 --- a/supertokens_python/recipe/session/framework/fastapi/__init__.py +++ b/supertokens_python/recipe/session/framework/fastapi/__init__.py @@ -81,7 +81,7 @@ async def session_exception_handler( Usage: `app.add_exception_handler(SuperTokensError, st_exception_handler)` """ base_req = FastApiRequest(request) - base_res = FastApiResponse(JSONResponse()) + base_res = FastApiResponse(JSONResponse(None)) user_context = default_user_context(base_req) result = await Supertokens.get_instance().handle_supertokens_error( base_req, exc, base_res, user_context