I’m using web2py in combination with a javascript client via jsonrpc. I noticed that for some errors web2py assigns a ticket and creates a stack trace which I can then look at and know exactly where the error occured (just like in normal python). In other cases web2py simply sends me the error via jsonrpc response, without specifying the file, function, or line that triggered it, and I simply see the following info:
‘message’: u’IndexError: list index out of range’, ‘code’: 100, ‘data’: None
Since I have no idea where this error occured, there is really no good way for me to debug it. Can I tell web2py to open a ticket for every error, or at least provide more information through jsonrpc?
In the web2py gluon/tools.py module, look for the function “serve_jsonrpc”. The exception handling there is the place that the error is being caught and repackaged as the message you see from the client. You should be able to put some breakpoints in the except clauses and find the issue