summaryrefslogtreecommitdiffstats
path: root/ipaserver/rpcserver.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-05-18 09:42:56 +0200
committerJan Cholasta <jcholast@redhat.com>2016-05-25 16:06:26 +0200
commite0275abe6f5192e68b7f57acf37b01aaa89003ea (patch)
tree3023bbb3db7e3369e865eabfe6b878e09cf7d38c /ipaserver/rpcserver.py
parent861294c0d62891dc9977e7203cc07496e35ec939 (diff)
downloadfreeipa-e0275abe6f5192e68b7f57acf37b01aaa89003ea.tar.gz
freeipa-e0275abe6f5192e68b7f57acf37b01aaa89003ea.tar.xz
freeipa-e0275abe6f5192e68b7f57acf37b01aaa89003ea.zip
rpc: include structured error information in responses
Include keyword arguments of exceptions in RPC responses. This is limited to JSON-RPC, as XML-RPC does not support additional data in error responses. Include keyword arguments of messages in RPC responses. Include keyword arguments of exceptions in batch command result. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/rpcserver.py')
-rw-r--r--ipaserver/rpcserver.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py
index df6473669..59135f298 100644
--- a/ipaserver/rpcserver.py
+++ b/ipaserver/rpcserver.py
@@ -457,6 +457,7 @@ class jsonserver(WSGIExecutioner, HTTP_Status):
error = dict(
code=error.errno,
message=error.strerror,
+ data=error.kw,
name=unicode(error.__class__.__name__),
)
principal = getattr(context, 'principal', 'UNKNOWN')