-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
Every router endpoint catches Exception and returns HTTP 400:
except Exception as e:
raise HTTPException(status_code=400, detail=f"Failed to ...: {str(e)}") from eThis masks actual server errors (e.g., KeyError, TypeError, AttributeError) as "bad request" responses when they should be 500 Internal Server Error. It also swallows tracebacks, making debugging difficult.
Suggested Fix
- Catch specific expected exceptions (e.g.,
ValueError,KeyErrorfor invalid platform) and return 400. - Let unexpected exceptions propagate to FastAPI's default 500 handler (or use a custom exception handler).
- Consider structured error responses with error codes for better client-side handling.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working