I’m new to Python and oauth2client library. I’m building a def which check for a valid credentials. I noticed that if I delete the grant from https://myaccount.google.com/permissions, then credentials.get_access_token(http) or similar does returns the old access_token. The program will run only into exception when credentials.refresh(http) is called.
Is there any way I could catch this exception before the credential is refreshed?
Source: Stack Overflow