Uploading to a held path fails silently — surface the legal-hold refusal in the UI #172
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Cordy/Cairn#172
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Dogfood note (Nikola): uploading a file to a path under a legal hold does nothing — no upload, but also no message. The server side is correct (the hold decorator refuses the write with
ErrHeld→ HTTP 403 with the "legal hold: this content is protected until the hold is lifted" message); the upload path in the UI swallows the error.Fix: upload failures must always surface the server's error message — a visible dialog/toast, with the hold message verbatim, for both the plain upload path and the TUS path (TUS finalize is where a held-path refusal lands for large files). While in there, verify the same for delete/rename/overwrite on held paths — every hold refusal a user can trigger should say why, not fizzle.
This also covers the general class: any mutating API error that today ends in a silent
catchshould reach the status line at minimum.Resolved for the reported case in current code (v0.6.8) — verified by reading
web/static/index.html+internal/api/api.go.The backend maps
storage.ErrHeld→ 403 with the hold text (writeErr),api()extracts{error}from it, anduploadFilesroutes the failure throughsayError— a prominent red banner (added explicitly for #172) that carries the server's own message. So a POST upload to a held path now shows:— not silent.
One known minor edge, tracked here: large-file resumable (TUS) uploads.
tusUploadonly special-cases 404/410/507/413; a 403 hold lands in the generic retry branch and, after retries, throwschunk failed (403)instead of the hold message. Low priority (normal uploads surface the hold correctly). Happy to add a TUS branch that reads the 403 body and throws it verbatim if this bites in practice.Closing the umbrella as resolved for the reported (silent-failure) behavior — reopen if the banner doesn't appear.