Add backend error logging and increase frontend timeout

This commit is contained in:
2026-02-25 11:49:42 -05:00
parent a9097b82d2
commit 9b9d788ca7
17 changed files with 660 additions and 5 deletions

View File

@ -128,6 +128,15 @@ app.add_middleware(
allow_headers=["*"],
)
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
@app.exception_handler(Exception)
async def global_exception_handler(request, exc):
logger.error(f"Global error: {exc}", exc_info=True)
return {"detail": "Internal Server Error", "message": str(exc)}
# Ensure upload directories exist
for sub in ["profiles", "vehicles", "businesses"]:
os.makedirs(os.path.join("uploads", sub), exist_ok=True)