[web] fix #724769: Use RemoteCallFailed in the publisher's error_handler stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 26 Feb 2010 07:44:18 +0100
branchstable
changeset 4709 6a71fc0b4274
parent 4708 2bd3d03721f3
child 4710 4d9ad6a4f261
[web] fix #724769: Use RemoteCallFailed in the publisher's error_handler On json_request, errors handled by the publisher should raise RemoteCallFailed exceptions instead of standard StatusResponse so that errbacks get called normally on the client side.
web/application.py
--- a/web/application.py	Fri Feb 26 07:26:47 2010 +0100
+++ b/web/application.py	Fri Feb 26 07:44:18 2010 +0100
@@ -395,6 +395,8 @@
         req.remove_header('Etag')
         req.message = None
         req.reset_headers()
+        if req.json_request:
+            raise RemoteCallFailed(unicode(ex))
         try:
             req.data['ex'] = ex
             if tb: