create_single_event_occurrence and create_recurrence_rule return 500 for an unknown event_id #66
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cal#66
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What's wrong
Both are site-admin, "testing purposes" routes.
POST /api/events/create_single_event_occurrence:ZoneInfo(event.event_timezone)(L421) andevent.last_updated_at(L423) run beforeif not event(L426), so an unknownevent_idraises AttributeError, so 500 instead of 404.POST /api/events/create_recurrence_rule: never checks the event (L368) and passes None topopulate_event_occurrences(), so 500.How to reproduce
As a site admin (
bearer(**SITE_ADMIN)):Both return 500.
Expected
404
{"error": "Event not found"}, checked before the event is used.Where to look
api/app/api/events.pycreate_recurrence_rules()L347-386 andcreate_single_event_occurrence()L390-458.2c5f2e9.Done when
api/tests/api/test_error_responses.py