nextcloud / nextcloud/calendar
Improve error handling in case an event in a shared calendar was edited by someone else
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 332
- Avg merge
- 16h 13m
- Merged PRs (30d)
- 137
Description
Is your feature request related to a problem? Please describe.
Let there be two users A and B that share a calendar with read and write permissions.
- User A start editing an event.
- User B starts editing the same event but saves first.
- User A tries to save their changes.
Result: User A will get a generic error toast in the lines of Failed to save event.
Describe the solution you'd like
Improve the error message and show something like The event was edited by someone else in the meantime. Please close the event and try again..
Christoph even suggested to go one step further and already show a warning while editing the event in case it has been updated by someone else. There is nothing more frustrating than having to retype extensive changes.
The error can be caught and handled pretty well as the server will respond with 412 Precondition Failed in those cases.
Describe alternatives you've considered
None
Additional context
A nice follow-up to https://github.com/nextcloud/calendar/pull/6152.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the implementation and context in pull request #6152, then trace how the calendar save response is handled when the server returns 412 Precondition Failed. Done means replacing the generic save error with a clear message explaining that another user edited the event; the suggested in-editor warning is a possible follow-up.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100