Skip to content

Commit

Permalink
fix: remove requests connection exception handler
Browse files Browse the repository at this point in the history
  • Loading branch information
markomirosavljev committed Jul 21, 2023
1 parent e4e378d commit 9c7605c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="fastapi-cognito",
version="2.4.0",
version="2.4.1",
author="Marko Mirosavljev",
author_email="mirosavljevm023@gmail.com",
description="Basic AWS cognito authentication package for FastAPI",
Expand Down
7 changes: 0 additions & 7 deletions src/fastapi_cognito/fastapi_cognito.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from fastapi.exceptions import HTTPException
from jose import JWTError
from pydantic_settings import BaseSettings
from requests.exceptions import ConnectionError as HttpConnectionError
from starlette.requests import Request

from .exceptions import CognitoAuthError
Expand Down Expand Up @@ -199,12 +198,6 @@ async def _decode_token(self, token) -> Dict:
status_code=401,
detail="Malformed authentication token"
)
except HttpConnectionError:
raise HTTPException(
status_code=500,
detail="Unable to establish connection with AWS, "
"your userpool region config might be incorrect."
)

async def auth_optional(self, request: Request) -> Any:
"""
Expand Down

0 comments on commit 9c7605c

Please sign in to comment.