Enable DEBUG logging and add global exception handler for 500s

This commit is contained in:
Admin
2026-06-20 02:37:21 +00:00
parent b897c29e9b
commit 4efd865c47
2 changed files with 8 additions and 1 deletions
+6
View File
@@ -970,6 +970,12 @@ app = FastAPI(
version="1.0.0",
)
@app.exception_handler(Exception)
async def global_exception_handler(request, exc):
logger.exception("Unhandled exception")
raise HTTPException(status_code=500, detail="Internal server error")
# Request models
class ListFoldersRequest(BaseModel):