Commit bebec135 authored by Dimitrios Gogos's avatar Dimitrios Gogos
Browse files

feat: add exception handler function placeholder

parent 4b22a8a2
Loading
Loading
Loading
Loading
+4 −1
Changes for src/portal_service/api/exception_handlers.py: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ need them (see MR-08).

Auth/authorization failures are handled inline in the api/auth layer via HTTPException, so they need no domain-error handler.
"""

from fastapi import FastAPI
from fastapi.responses import JSONResponse

_PROBLEM_MEDIA_TYPE = "application/problem+json"
@@ -26,3 +26,6 @@ def _problem(status: int, title: str, detail: str, instance: str) -> JSONRespons
            "instance": instance,
        },
    )

def register_exception_handlers(app: FastAPI) -> None:
    return None
 No newline at end of file