open-forms
open-forms copied to clipboard
Refactor - rethink email digest structure and handle exceptions
#4413 and #4400 show that the email digest is getting bigger and seems that we repeat some parts in the code for each broken part of OpenForms (failed_emails, invalid_logic_rules etc. ). This needs discussion and we could make it better by refactoring the code.
For example Sergei mentioned that it would be better to loop over all the forms (one query) and do the various checks there instead of getting all the forms for each check individually.
Furthermore, various exceptions may be raised (like the one in issue 4400) and this can cause the crash of the whole email digest. These exceptions should be handled and inform the user about them.