Production error handling for FastAPI — exception handlers, structured error
96
96%
Does it follow best practices?
Impact
98%
6.12xAverage score across 5 eval scenarios
Passed
No known issues
Build a meeting room booking API with FastAPI and Python. The API manages rooms and reservations.
POST /api/rooms -- create a room with name: str, capacity: int (> 0), floor: intGET /api/rooms -- list all rooms, with optional min_capacity: int filterPOST /api/bookings -- create a booking with room_id: int, title: str, start_time: datetime, end_time: datetime, organizer_email: strGET /api/bookings/{booking_id} -- get booking detailsDELETE /api/bookings/{booking_id} -- cancel a bookingGET /api/rooms/{room_id}/availability -- check room availability for a given date: date query paramBusiness rules:
Produce Python files:
app/main.py -- FastAPI app with all routesapp/schemas.py -- Pydantic request/response modelsapp/db.py -- in-memory data store (no real database)Do not include test files or deployment configuration.