toypdf / api /exception.py
Janar Ramalingam
first cut working version
51a7f02
raw
history blame contribute delete
No virus
339 Bytes
from fastapi import FastAPI, UploadFile, File, HTTPException, Request
from fastapi.responses import JSONResponse
from typing import Any, Dict
async def generic_exception_handler(request: Request, exc: Exception) -> JSONResponse:
return JSONResponse(
status_code=500,
content={"message": "Internal server error"},
)