Skip to content

Commit

Permalink
Merge pull request #315 from bug-or-feature/invalid_token
Browse files Browse the repository at this point in the history
remove TokenInvalid handling from IGSessionCrud
  • Loading branch information
bug-or-feature authored Dec 4, 2023
2 parents e99f212 + 84e76d2 commit a0ada1d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions trading_ig/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ def create(self, endpoint, params, session, version):
if response.status_code in [401, 403]:
if api_limit_hit(response.text):
raise ApiExceededException()
if token_invalid(response.text):
logger.warning("Invalid session token, triggering refresh...")
del self.session.headers["Authorization"]
raise TokenInvalidException()
if "error.public-api.failure.kyc.required" in response.text:
raise KycRequiredException(
"KYC issue: you need to login manually to the web interface and "
Expand Down

0 comments on commit a0ada1d

Please sign in to comment.