[FIX] report_csv: Return werkzeug Exception

pull/773/head
Denis Roussel 2023-06-27 12:01:33 +02:00
parent dd58993fc1
commit 8a7b3274cd
1 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@
import json
import logging
from werkzeug.exceptions import InternalServerError
from werkzeug.urls import url_decode
from odoo.http import (
@ -103,4 +104,5 @@ class ReportController(report.ReportController):
_logger.exception("Error while generating report %s", reportname)
se = _serialize_exception(e)
error = {"code": 200, "message": "Odoo Server Error", "data": se}
return request.make_response(html_escape(json.dumps(error)))
res = request.make_response(html_escape(json.dumps(error)))
raise InternalServerError(response=res) from e