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

<HttpError 400 when requesting https://www.googleapis.com/gmail/v1/users/julian.klode%40gmail.com/messages/15c69db4486d0718/modify?alt=json returned "Can only add on e of: INBOX, SPAM, TRASH"> #26

Closed
julian-klode opened this issue Jun 2, 2017 · 6 comments · Fixed by #27

Comments

@julian-klode
Copy link
Contributor

@julian-klode julian-klode commented Jun 2, 2017

If I locally tag a mail as both +inbox and +trash (which makes no sense, really), the sync fails. gmailieer should instead just drop the inbox tag and add the trash tag I guess.

julian-klode added a commit to julian-klode/gmailieer that referenced this issue Jun 2, 2017
The gmail API fails with an error otherwise.

fixes gauteh#26
@julian-klode

This comment has been minimized.

Copy link
Contributor Author

@julian-klode julian-klode commented Jun 2, 2017

See pull request #27

@gauteh

This comment has been minimized.

Copy link
Owner

@gauteh gauteh commented Jun 6, 2017

Seems like the best approach, do you have any reference for the API behavior? Also, I guess we should print a warning. The most defensive approach would be to drop either TRASH or SPAM labels, but I don't think it is the most frequently desired behavior.

@julian-klode

This comment has been minimized.

Copy link
Contributor Author

@julian-klode julian-klode commented Jun 6, 2017

I don't think there's any reference, only the error message (and well it makes sense). Could make the handling dependant on the excluded tags in the notmuch config. If spam and trash are excluded, do what I did; otherwise apply inbox again (that would match the visible local behaviour).

@gauteh

This comment has been minimized.

Copy link
Owner

@gauteh gauteh commented Jun 6, 2017

Hm ok, seems too complicated. I guess we should just mirror gmails behavior like you do now. But:

  • Print warning
  • Add note to Caveats section of README.md
julian-klode added a commit to julian-klode/gmailieer that referenced this issue Jun 6, 2017
The gmail API fails with an error otherwise.

fixes gauteh#26
@julian-klode

This comment has been minimized.

Copy link
Contributor Author

@julian-klode julian-klode commented Jun 6, 2017

Pull request updated.

@gauteh gauteh closed this in #27 Jun 7, 2017
@gauteh

This comment has been minimized.

Copy link
Owner

@gauteh gauteh commented Jun 7, 2017

Thanks, for some reason I never receive notifications from this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.