diff roundup/mailgw.py @ 5085:d3d9d1402763

issue2550823 Improve mailgw logging for node creation errors. Add a call to logger.exception when an error is raised on creation
author John Rouillard <rouilj@ieee.org>
date Sat, 18 Jun 2016 00:39:01 -0400
parents d995ee7d49bf
children 14abd0a67207
line wrap: on
line diff
--- a/roundup/mailgw.py	Fri Jun 17 22:10:01 2016 -0400
+++ b/roundup/mailgw.py	Sat Jun 18 00:39:01 2016 -0400
@@ -1198,6 +1198,7 @@
                             ) % locals()
                 self.nodeid = self.cl.create(**self.props)
         except (TypeError, IndexError, ValueError, exceptions.Reject), message:
+            self.mailgw.logger.exception("Rejecting email due to node creation error:")
             raise MailUsageError, _("""
 There was a problem with the message you sent:
    %(message)s

Roundup Issue Tracker: http://roundup-tracker.org/