You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a look at this error handling logic in kobo/django/xmlrpc/dispatcher.py, _marshaled_dispatch method:
try:
if dispatch_method is not None:
response = dispatch_method(method, params)
else:
response = self._dispatch(method, params)
# wrap response in a singleton tuple
response = (response,)
response = xmlrpclib.dumps(response, methodresponse=1, allow_none=self.allow_none, encoding=self.encoding)
except xmlrpclib.Fault as fault:
response = xmlrpclib.dumps(fault, allow_none=self.allow_none, encoding=self.encoding)
except:
# report exception back to server
if settings.DEBUG:
from kobo.tback import Traceback
response = xmlrpclib.dumps(
xmlrpclib.Fault(1, u"%s" % Traceback().get_traceback()),
allow_none=self.allow_none, encoding=self.encoding)
else:
response = xmlrpclib.dumps(
xmlrpclib.Fault(1, "%s: %s" % (sys.exc_type.__name__, sys.exc_info()[1])),
allow_none=self.allow_none, encoding=self.encoding)
Consider what happens if the XML-RPC method raises any unexpected exception. Except for DEBUG mode, the exception details (traceback) will be discarded. This can make it virtually impossible to identify which code raised an exception. Even in DEBUG mode, the exception info is only passed to the client, so the root cause of an error on the server requires looking into logs on the client.
This should be improved so that unexpected exceptions during XML-RPC methods are always logged on the server.
The text was updated successfully, but these errors were encountered:
Have a look at this error handling logic in kobo/django/xmlrpc/dispatcher.py, _marshaled_dispatch method:
Consider what happens if the XML-RPC method raises any unexpected exception. Except for DEBUG mode, the exception details (traceback) will be discarded. This can make it virtually impossible to identify which code raised an exception. Even in DEBUG mode, the exception info is only passed to the client, so the root cause of an error on the server requires looking into logs on the client.
This should be improved so that unexpected exceptions during XML-RPC methods are always logged on the server.
The text was updated successfully, but these errors were encountered: