Roundup Tracker - Issues

Issue 2550823

classification
Improve mailgw logging for node creation errors.
Type: rfe Severity: minor
Components: Mail interface Versions: 1.5
process
Status: closed fixed
:
: rouilj : ber, jerrykan, r.david.murray, rouilj
Priority: : patch

Created on 2013-11-25 13:33 by r.david.murray, last changed 2016-06-18 04:46 by rouilj.

Files
File name Uploaded Description Edit Remove
mailgw-error-logging.patch r.david.murray, 2013-11-25 13:33
Messages
msg4952 Author: [hidden] (r.david.murray) Date: 2013-11-25 13:33
I was trying to debug a problem with sending mail to my customized
roundup instance, and all I was getting for error information was the
line "There was a problem with the message you sent:", followed by the
str of an exception, in the bounce message from the gateway.  There was
no error indication in the instance log.  This was not enough
information to track down the problem.  I added the logging line in the
attached patch to mailgw.py to log the traceback, and that led me
directly to the problem.
msg4953 Author: [hidden] (ber) Date: 2013-11-25 16:33
David,
thanks for the report and the patch.
Is there a way the problem for your logger can be triggered easily?
msg4954 Author: [hidden] (r.david.murray) Date: 2013-11-25 17:29
Yes.  I had a 'create' auditor that did:

   users = db.category.get(category, 'add_as_nosy')

and the 'category' variable was None when the issue was first created
via the email interface.  So the error message I got in response to the
email was just that None was an unknown category variable, but without
the traceback I had no idea what code was trying to look up None.

I presume you would get the same kind of error if you try to look up
None on any existing property, such as 'priority', in a create auditor.
msg5607 Author: [hidden] (rouilj) Date: 2016-06-18 04:46
This looks like a simple enough patch. One liner that calls 
functions already in use in the file.

Checked in as d3d9d1402763

test_mailgw.py run passed after patch.
History
Date User Action Args
2016-06-18 04:46:19rouiljsetstatus: new -> closed
assignee: rouilj
resolution: fixed
messages: + msg5607
nosy: + rouilj
2014-07-22 06:18:10jerrykansetnosy: + jerrykan
2013-11-25 17:29:41r.david.murraysetmessages: + msg4954
2013-11-25 16:33:04bersetnosy: + ber
messages: + msg4953
2013-11-25 13:33:32r.david.murraycreate