Skip to content

Commit

Permalink
Merge PR #421 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by simahawk
  • Loading branch information
OCA-git-bot committed Mar 18, 2024
2 parents 4d79ee0 + a23d79f commit d850993
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 d850993

Please sign in to comment.