Skip to content

Commit

Permalink
Correctly re-raise AuthenticationError as such
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed Mar 28, 2024
1 parent 12cafae commit 27dd0b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lavalink/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ async def _request(self, method: str, path: str, to=None, trace: bool = False, v

raise RequestError('An invalid response was received from the node.',
status=res.status, response=await res.json(), params=kwargs.get('params', {}))
except RequestError:
raise
except (AuthenticationError, RequestError):
raise # Pass the caught errors back to the caller in their 'original' form.
except Exception as original: # It's not pretty but aiohttp doesn't specify what exceptions can be thrown.
raise ClientError from original

0 comments on commit 27dd0b5

Please sign in to comment.