Skip to content

Commit

Permalink
fix: only raise AuthenticationError from auth plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunato authored Aug 24, 2023
1 parent 610eb03 commit 6c4f9d0
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions eodag/plugins/authentication/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ def authenticate(self):
response.raise_for_status()
except RequestException as e:
response_text = getattr(e.response, "text", "").strip()
logger.error(
f"Could no get authentication token: {str(e)}, {response_text}"
)
if e.response and e.response.status_code == 401:
raise Exception # do not forward unauthorized from provider to user
raise AuthenticationError(
f"Could no get authentication token: {str(e)}, {response_text}"
)
Expand Down

0 comments on commit 6c4f9d0

Please sign in to comment.