Skip to content

fix: show the server's upload error on servers without TUS - #4243

Merged
AlexAndBear merged 1 commit into
mainfrom
fix/xhr-upload-error-messages
Nov 6, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
fix/xhr-upload-error-messages

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

  • Error messages: On servers without TUS, failed uploads now show the real reason ("This item is locked", "Quota exceeded" or the server's message) instead of always "Unknown error".
  • Retries: Failed non-TUS uploads are only retried on network errors now, not on every 4xx/5xx response, so a full quota or a locked target doesn't upload the whole file three more times. This matches what we already do for TUS.

Related Issue

How Has This Been Tested?

  • test environment: unit tests (Vitest), browser tests (Playwright) against a local OpenCloud
  • test case 1: unit: xhr upload errors with 423, 507 and a 500 with a server message show the right text, an empty 500 shows Unknown error; xhr retries only on status 0
  • test case 2: browser (TUS disabled via mocked capabilities): 423 on file and folder, 507, 500 with message, empty and HTML 500 show the right messages with one request each, network aborts are still retried; TUS uploads and a TUS 507 unchanged

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear
AlexAndBear merged commit 80b6233 into main Nov 6, 2026
29 checks passed
@AlexAndBear
AlexAndBear deleted the fix/xhr-upload-error-messages branch November 6, 2026 09:10
@openclouders openclouders mentioned this pull request Nov 6, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uploads without TUS always fail with "Unknown error"

2 participants