log traceback info for failed api requests

This commit is contained in:
Jack Robison 2017-12-06 19:52:06 -05:00
parent b2a0aa21c9
commit b7503f8b61
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF

View file

@ -224,7 +224,8 @@ class AuthJSONRPCServer(AuthorizedBase):
else:
# last resort, just cast it as a string
error = JSONRPCError(str(failure))
log.warning("error processing api request: %s", error.message)
log.warning("error processing api request: %s\ntraceback: %s", error.message,
"\n".join(error.traceback))
response_content = jsonrpc_dumps_pretty(error, id=id_)
self._set_headers(request, response_content)
request.setResponseCode(200)