Mercurial > kallithea
changeset 1796:6274adc06988 beta
fixed RPC call for api that was missing request id
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 21 Dec 2011 02:07:41 +0200 |
parents | 58e4dbb5884a |
children | 2ee93fba129e |
files | rhodecode/controllers/api/__init__.py |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/api/__init__.py Wed Dec 21 02:06:09 2011 +0200 +++ b/rhodecode/controllers/api/__init__.py Wed Dec 21 02:07:41 2011 +0200 @@ -4,7 +4,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ JSON RPC controller - + :created_on: Aug 20, 2011 :author: marcink :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> @@ -226,15 +226,20 @@ if self._error is not None: raw_response = None - response = dict(id=self._req_id, result=raw_response, + response = dict(id=self._req_id, result=raw_response, error=self._error) try: return json.dumps(response) except TypeError, e: log.debug('Error encoding response: %s', e) - return json.dumps(dict(result=None, - error="Error encoding response")) + return json.dumps( + dict( + self._req_id, + result=None, + error="Error encoding response" + ) + ) def _find_method(self): """