Skip to content

[stable35] fix(wopi): report a locked file as 423, not 500 - #6064

Merged
elzody merged 1 commit into
stable35from
backport/6054/stable35
Sep 9, 2026
Merged

[stable35] fix(wopi): report a locked file as 423, not 500#6064
elzody merged 1 commit into
stable35from
backport/6054/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 9, 2026

Copy link
Copy Markdown

Backport of PR #6054

When putContent() throws LockedException the file is locked by another
operation and we have written nothing. Answering 500 says the server is
broken, which it isn't, and it buries a routine, self-resolving
condition in the error logs.

It also misleads the editor. Collabora Online cannot tell a genuine
fault from a refusal, so after the failed upload it asks for
CheckFileInfo to work out whether the document in storage is still the
one it knows. A 423 lets it see the upload for what it was and retry
once the lock clears.

423 is what this controller already answers with when the lock manager
reports a file locked in lock() and refreshLock(); use it on the write
path too.

Do not use 409: in WOPI that means the document changed in storage, and
Collabora Online reads it that way. It would put a conflict dialog in
front of the user, asking them to discard their work or overwrite a file
that nobody has touched.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
@backportbot
backportbot Bot requested a review from timar September 9, 2026 18:33
@backportbot backportbot Bot added the 3. to review Ready to be reviewed label Sep 9, 2026
@elzody
elzody merged commit a6647e4 into stable35 Sep 9, 2026
64 checks passed
@elzody
elzody deleted the backport/6054/stable35 branch September 9, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants