fix(api): generic 500 bodies and typed id params #21
No reviewers
Labels
No labels
bug
chore
data
feature
frontend
good first issue
intermediate
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cal!21
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/api-errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
263 API tests pass, including new ones for the 404 and for 500 bodies carrying no exception text. 4xx messages are unchanged.
Handlers returned str(e) in their 500 responses, which leaked SQL, table names and other internals to callers. They now log the exception and return {"error": "Internal server error"}. 4xx bodies are unchanged. - /test_db keeps {"status": "error"} for the keepalive workflow, which only reads .status, but no longer returns details. - read_gcal_link used its own {"success", "error", "message"} 500 shape; no web client reads those fields, so it now matches the rest. - google.py swallowed exceptions without logging; each handler now calls log.exception. /unauthorize keeps its 400.