Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vdk-control-api-auth: add better error message for refresh token fail…
…ure (#2607) In case user cannot refresh their access token currently we simply show error "KeyError: 'access_token'" with some stack trace which makes it practically impossible for the user to know what to do. ``` Traceback (most recent call last): File "/opt/conda/lib/python3.7/site-packages/vdk/internal/cli_entry.py", line 140, in vdk_main program_name=program_name, File "/opt/conda/lib/python3.7/site-packages/pluggy/_hooks.py", line 433, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ........ File "/opt/conda/lib/python3.7/site-packages/vdk/plugin/control_api_auth/base_auth.py", line 167, in __exchange_refresh_for_access_token self.update_access_token(json_data[AuthRequestValues.ACCESS_TOKEN_KEY.value]) KeyError: 'access_token' ``` This changes that to explicitly raise an appropriate exception and recommend what user should do
- Loading branch information