nextcloud / nextcloud/calendar

Improve error handling in case an event in a shared calendar was edited by someone else

Open
#6,166 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement Feature: Editor Feature: Sharing skill:frontend
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.

  1. User A start editing an event.
  2. User B starts editing the same event but saves first.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.