Skip to content

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

Merged
elzody merged 1 commit into
stable33from
backport/6054/stable33
Sep 9, 2026
Merged

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

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:32
@backportbot backportbot Bot added the 3. to review Ready to be reviewed label Sep 9, 2026
@elzody
elzody enabled auto-merge September 9, 2026 18:37
@elzody
elzody merged commit 25364b0 into stable33 Sep 9, 2026
67 of 70 checks passed
@elzody
elzody deleted the backport/6054/stable33 branch September 9, 2026 18:52
@elzody elzody mentioned this pull request Sep 9, 2026
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