Set the media type of a custom Error Response via a pydantic model in FastAPI
Set the media type of a custom Error Response via a pydantic model in FastAPI Question: In my FastAPI application I want to return my errors as RFC Problem JSON: from pydantic import BaseModel class RFCProblemJSON(BaseModel): type: str title: str detail: str | None status: int | None I can set the response model in …