summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic
diff options
context:
space:
mode:
authorCedric Snauwaert <csn@openerp.com>2020-02-18 12:53:00 +0000
committerCedric Snauwaert <csn@openerp.com>2020-02-18 14:50:57 +0000
commit07d5ea3779d796f621ce4cc5f9c2caa940d2012e (patch)
tree675402cacdae3ca52c7b1abc4533550c4f3c155c /addons/web/static/src/js/views/basic
parent60b0f6da3420e0bb0607bd73abb4d0a1f5a0a972 (diff)
[FIX] http.py: remove try except in JsonRequest.dispatch()
The idea is to make the dispatching and error-handling consistent for JsonRequest and HTTPRequest. In 8809c77f6088c140355fba5f862c0335b1d90c4e we introduced a way for request-specific error-handling, but JsonRequest.dispatch() was still catching all errors internally, instead of letting them bubble up to ir_http._handle_exception() By removing the internal try except in JsonRequest.dispatch(), we do not change the behavior much as there are only a couple of "if" in ir_http._handle_exception() before returning to the request-specific handle_exception. However we give the opportunity to modules to customize exception handling even for JsonRPC, the same way it is possible for HTTP requests. Here is a simple pseudo code of the flow ir_http.dispatch(): try: request.dispatch() catch Exception as e: ir_http._handle_exception(e) ir_http.handle_exception(e) request._handle_exception(e) closes odoo/odoo#45639 Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic')
0 files changed, 0 insertions, 0 deletions