diff --git a/trytond/trytond/protocols/wrappers.py b/trytond/trytond/protocols/wrappers.py index 6937c078df..b115a66f46 100644 --- a/trytond/trytond/protocols/wrappers.py +++ b/trytond/trytond/protocols/wrappers.py @@ -304,21 +304,7 @@ def with_pool(func): with Transaction().start(database_name, 0, readonly=True): pool.init() - try: - result = func(request, pool, *args, **kwargs) - except (UserError, UserWarning) as e: - if request.rpc_method: - raise - else: - abort(HTTPStatus.BAD_REQUEST, e) - except exceptions.HTTPException: - raise - except Exception as e: - if request.rpc_method: - raise - else: - abort(HTTPStatus.INTERNAL_SERVER_ERROR, e) - return result + return func(request, pool, *args, **kwargs) return wrapper