Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

feat: Better error message for expired token #442

Open
Jim-Holmstroem opened this issue Mar 7, 2019 · 3 comments
Open

feat: Better error message for expired token #442

Jim-Holmstroem opened this issue Mar 7, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@Jim-Holmstroem
Copy link

Jim-Holmstroem commented Mar 7, 2019

Using gdrive with an expired token:

$ gdrive about
Failed to get about: Get https://www.googleapis.com/drive/v3/about?alt=json&fields=maxImportSizes%2CmaxUploadSize%2CstorageQuota%2Cuser: oauth2: cannot fetch token: 400 Bad Request
Response: {
  "error": "invalid_grant",
  "error_description": "Bad Request"
}

which is really confusing.
It would be nice to have a note about expiry and have it re-authentication the same way as for first time users.

Related to: #197

@mbenlioglu mbenlioglu added the enhancement New feature or request label Mar 11, 2019
@Stunner
Copy link

Stunner commented Mar 17, 2019

I figured this error I was seeing was due to my token being expired... do you happen to know how to provide gdrive a new token?

@Stunner
Copy link

Stunner commented Mar 17, 2019

Figured it out. Do the following:

# remove the token file
rm ~/.gdrive/token_v2.json
# run the about subcommand to re-prompt you for authentication:
gdrive about

@jburton-trg
Copy link

Yup - error message was so confusing I had no idea this simple problem was the issue. Delete the json and start again. Schimples.

Please update the error!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants