Commit 9d3f4d7
fix(wopi): report a locked file as 423, not 500
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>1 parent e36a132 commit 9d3f4d7
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
678 | | - | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
679 | 682 | | |
680 | 683 | | |
681 | 684 | | |
| |||
819 | 822 | | |
820 | 823 | | |
821 | 824 | | |
822 | | - | |
| 825 | + | |
| 826 | + | |
823 | 827 | | |
824 | 828 | | |
825 | 829 | | |
| |||
0 commit comments