Skip to content

Commit

Permalink
Merge pull request #39 from WinesProof/main
Browse files Browse the repository at this point in the history
Fix bug in error message for update_token
  • Loading branch information
itsjafer authored Jan 8, 2024
2 parents 5563114 + 5084ae9 commit 4be5807
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schwab_api/schwab.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def get_account_info_v2(self):
def update_token(self, token_type='api'):
r = self.session.get(f"https://client.schwab.com/api/auth/authorize/scope/{token_type}")
if not r.ok:
raise ValueError("Error updating Bearer token: {r.reason}")
raise ValueError(f"Error updating Bearer token: {r.reason}")
token = json.loads(r.text)['token']
self.headers['authorization'] = f"Bearer {token}"

0 comments on commit 4be5807

Please sign in to comment.