File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44
55[project ]
66name = " ws-api"
7- version = " 0.33.1 "
7+ version = " 0.33.2 "
88description = " Access your Wealthsimple account using their (GraphQL) API."
99readme = " README.md"
1010license = {file = " LICENSE" }
Original file line number Diff line number Diff line change @@ -176,7 +176,8 @@ def check_oauth_token(
176176 try :
177177 self .search_security ("XEQT" )
178178 except WSApiException as e :
179- if e .response is None or e .response .get ("message" ) != "Not Authorized." :
179+ is_not_authorized = e .response is not None and (e .response .get ("message" ) == "Not Authorized." or ('errors' in e .response and e .response .get ('errors' )[0 ].get ("message" ) == "Not Authorized." ))
180+ if not is_not_authorized :
180181 raise
181182 # Access token expired; try to refresh it below
182183 else :
You can’t perform that action at this time.
0 commit comments