Skip to content

Commit

Permalink
Merge PR #453 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by lmignon
  • Loading branch information
OCA-git-bot committed Oct 1, 2024
2 parents 448ac10 + 84e07e8 commit 8335a6b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fastapi/fastapi_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from contextlib import contextmanager
from io import BytesIO

from werkzeug.exceptions import InternalServerError

from odoo.http import Dispatcher, request

from .context import odoo_env_ctx
Expand Down Expand Up @@ -35,7 +37,10 @@ def dispatch(self, endpoint, args):
)

def handle_error(self, exc):
pass
# At this stage all the normal exceptions are handled by FastAPI
# and we should only have InternalServerError occurring after the
# FastAPI app has been called.
return InternalServerError() # pragma: no cover

def _make_response(self, status_mapping, headers_tuple, content):
self.status = status_mapping[:3]
Expand Down

0 comments on commit 8335a6b

Please sign in to comment.