Skip to content

Conversation

@jafin
Copy link

@jafin jafin commented Jan 18, 2026

Improve details of any invalid filters found

Warning: Error getting one or more filters from Gmail: 1 error occurred:
* importing filter "ABC123XYZ": error message

Users will see:

Warning: Error getting one or more filters from Gmail: 1 error occurred:
* importing filter "ABC123XYZ" (criteria: from:someone@example.com subject:hello): error message

This makes it much easier to identify the problematic filter by showing its search criteria (from, to, subject, query) alongside the filter ID.

Reason

This came to be as I was having issues diagnosing why it was reporting i had invalid filters. I could not find it.
In the end it was a filter that replies with a template. It was considered "invalid" by gmailctl
Adding additional hints to which filter it is, allows faster tracing to the problematic filter.

 Warning: Error getting one or more filters from Gmail: 1 error occurred:
      * importing filter "ABC123XYZ": error message

  Users will see:

  Warning: Error getting one or more filters from Gmail: 1 error occurred:
      * importing filter "ABC123XYZ" (criteria: from:someone@example.com subject:hello): error message

  This makes it much easier to identify the problematic filter by showing its search criteria (from, to, subject, query) alongside the filter ID.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant