Commit c9ef3746 authored by Elouan Martinet's avatar Elouan Martinet
Browse files

[views] Pass through more types of exceptions

parent 6bcf3f2bf687
......@@ -30,12 +30,14 @@ from cubicweb.predicates import (
)
from cubicweb.uilib import exc_message
from cubicweb.utils import json_dumps
from cubicweb.web import RemoteCallFailed, DirectResponse
from cubicweb.web import RequestError, RemoteCallFailed, DirectResponse
from cubicweb.web.controller import Controller
from cubicweb.web.views.urlrewrite import rgx_action, SchemaBasedRewriter
from cubicweb import Binary
from cubicweb_rqlcontroller.rql_schema_holder import RqlIOSchemaHolder
from pyramid import httpexceptions
ARGRE = re.compile(r'__r(?P<ref>\d+)$')
DATARE = re.compile(r'__f(?P<ref>.+)$')
......@@ -151,7 +153,8 @@ class RqlIOController(Controller):
args = self.json()
try:
result = self.rqlio(version, *args)
except (RemoteCallFailed, DirectResponse):
except (RequestError, DirectResponse,
httpexceptions.HTTPException):
raise
except Exception as exc:
raise RemoteCallFailed(exc_message(exc, self._cw.encoding))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment