Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Jan 2, 2024
1 parent d4230c0 commit 2170961
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jupyverse_api/jupyverse_api/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from fastapi import Request, Response
from typing import cast

from fastapi import Request
from fastapi.responses import RedirectResponse


Expand All @@ -7,5 +9,6 @@ def __init__(self, redirect_to: str):
self.redirect_to = redirect_to


async def _redirect_exception_handler(request: Request, exc: RedirectException) -> Response:
async def _redirect_exception_handler(request: Request, exc: Exception) -> RedirectResponse:
exc = cast(RedirectException, exc)
return RedirectResponse(url=exc.redirect_to)

0 comments on commit 2170961

Please sign in to comment.