Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
rqlcontroller
Commits
666138da312e
Commit
c9ef3746
authored
May 03, 2021
by
Elouan Martinet
Browse files
[views] Pass through more types of exceptions
parent
6bcf3f2bf687
Changes
1
Hide whitespace changes
Inline
Side-by-side
cubicweb_rqlcontroller/views.py
View file @
666138da
...
...
@@ -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
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment