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

Workaround #48 #49

Closed
wants to merge 1 commit into from
Closed

Workaround #48 #49

wants to merge 1 commit into from

Conversation

ktf
Copy link
Contributor

@ktf ktf commented Nov 16, 2017

This adds a notmuch "unknown" tag whenever a label id which cannot be found
in the list of available label ids is retrieved from a message. Notice the
"unknown" tag is never synchronized.

This adds a notmuch "unknown" tag whenever a label id which cannot be found
in the list of available label ids is retrieved from a message. Notice the
"unknown" tag is never synchronized.
@ktf ktf mentioned this pull request Nov 16, 2017
@gauteh
Copy link
Owner

gauteh commented Nov 16, 2017

Thanks; good that you figured out a way to get around this. I don't think I want to merge this right away since there must be some other underlying error. Could you try to put in the offending label in https://developers.google.com/gmail/api/v1/reference/users/labels/get ? Maybe we have to manually fetch the label if it didn't get fetched the first time.

@gauteh
Copy link
Owner

gauteh commented Nov 16, 2017

If we can confirm that this is indeed a non-existant label, maybe it would be better to just not add anything and ignore it. It would possibly delete the label on the GMail side in the future so I think we should have a switch which allows this. It is likely to only be an issue on initial sync anyway. Then we can just advice the user to enable this switch if he/she wants.

@ktf
Copy link
Contributor Author

ktf commented Nov 16, 2017

Actually, the label is not there at all, neither in list, nor if I get it by id:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "notFound",
    "message": "Not Found"
   }
  ],
  "code": 404,
  "message": "Not Found"
 }
}

other labels are actually there.

@ktf
Copy link
Contributor Author

ktf commented Nov 16, 2017

And if I look into the message itself, the label is actually there:

 "labelIds": [
  "Label_3",
  "CATEGORY_PERSONAL"
 ],

@gauteh
Copy link
Owner

gauteh commented Nov 17, 2017 via email

@ktf
Copy link
Contributor Author

ktf commented Nov 17, 2017

I will try. I am also trying to see if another route works better.

@gauteh gauteh mentioned this pull request Nov 17, 2017
@gauteh
Copy link
Owner

gauteh commented Nov 17, 2017

Check out the approach in #51, does that work for you?

@gauteh
Copy link
Owner

gauteh commented Nov 19, 2017

Implemented through #51.

@gauteh gauteh closed this Nov 19, 2017
@ktf
Copy link
Contributor Author

ktf commented Nov 20, 2017

thanks. That's what I needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants