afewmail / afew

an initial tagging script for notmuch mail
ISC License
325 stars 97 forks source link

HeaderMatchingFilter: Gracefully handle missing headers #336

Closed tohojo closed 9 months ago

tohojo commented 1 year ago

Notmuch can raise a NullPointerException when trying to read a non-existent header from a message. Gracefully handle this in the HeaderMatchingFilter by just aborting processing when encountering such an error.

GuillaumeSeren commented 1 year ago

Hello, thank you for the patch.

This look like improvement to me but I would like this code to test covered, do you mind adding a test for this ?

tohojo commented 11 months ago

Guillaume Seren @.***> writes:

Hello, thank you for the patch.

This look like improvement to me but I would like this code to test covered, do you mind adding a test for this ?

Sure, PTAL :)

GuillaumeSeren commented 9 months ago

Hey @tohojo , Thank you for the upgraded patch with the test support for this case.

It is LGTM :+1: