Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message for expired token could be clearer #420

Open
tbm opened this issue Dec 6, 2023 · 0 comments
Open

Error message for expired token could be clearer #420

tbm opened this issue Dec 6, 2023 · 0 comments

Comments

@tbm
Copy link
Contributor

tbm commented Dec 6, 2023

I upgraded from 3.4.0 to 4.2.0 recently. I can't test 3.4.0 easily now because of the config changes, but I think the error message for expired tokens was clearer there.

Now it shows the "Usage" text (but I called the program correctly so why are you showing this?) and shows the errors twice.

I think it should show the error and then tell me to run gphotos-uploader-cli auth. Thanks

[info]   Reading configuration from '/home/tbm/.gphotos-uploader-cli/config.hjson'
[info]   Authenticating using token for '.......'
Error: oauth2: "invalid_grant" "Token has been expired or revoked."
Usage:
  gphotos-uploader-cli push [flags]

Flags:
      --dry-run   Dry run mode
  -h, --help      help for push

Global Flags:
      --config string   Sets the config folder path. All configuration will be kept in this folder. (default "/home/tbm/.gphotos-uploader-cli")
      --debug           Log very verbose information. Useful for troubleshooting.
      --silent          Run in silent mode and prevent any log output except panics.

Error ocurred: oauth2: "invalid_grant" "Token has been expired or revoked."zsh: exit 1     gphotos-uploader-cli push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants