X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=openerp%2Fhttp.py;h=eddbcb669a396b1efb8676444d4f6fd2b9de6f13;hb=ffda02329595faf38dd6fb337217fd28772ba565;hp=343520433eae3d4c46ab0d929ee414a4173c7815;hpb=bc24d1b010540f16217003e222a3469bc9712a92;p=odoo%2Fodoo.git diff --git a/openerp/http.py b/openerp/http.py index 3435204..eddbcb6 100644 --- a/openerp/http.py +++ b/openerp/http.py @@ -516,16 +516,19 @@ class JsonRequest(WebRequest): try: return super(JsonRequest, self)._handle_exception(exception) except Exception: - if not isinstance(exception, openerp.exceptions.Warning): + if not isinstance(exception, (openerp.exceptions.Warning, SessionExpiredException)): _logger.exception("Exception during JSON request handling.") error = { 'code': 200, - 'message': "OpenERP Server Error", + 'message': "Odoo Server Error", 'data': serialize_exception(exception) } if isinstance(exception, AuthenticationError): error['code'] = 100 - error['message'] = "OpenERP Session Invalid" + error['message'] = "Odoo Session Invalid" + if isinstance(exception, SessionExpiredException): + error['code'] = 100 + error['message'] = "Odoo Session Expired" return self._json_response(error=error) def dispatch(self):