Skip to content

fix: no unhandled error when the server rejects a link password - #3712

Merged
AlexAndBear merged 2 commits into
mainfrom
fix/link-password-unhandled
Oct 14, 2026
Merged

AlexAndBear merged 2 commits into
mainfrom
fix/link-password-unhandled

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

  • Clipboard write is caught: useCopyLink catches the rejection of navigator.clipboard.write, which also rejects when the link creation fails, so a rejected password only shows the inline error.
  • Reject with an Error: copyLink passes the original error on and CreateLinkModal rejects with an Error instead of undefined.

Related Issue

How Has This Been Tested?

  • test environment: unit tests (Vitest), full unit suite
  • test case 1: copyLink with a rejecting link handler rejects with that error and leaves no unhandled rejection

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 9246c4d into main Oct 14, 2026
27 checks passed
@AlexAndBear
AlexAndBear deleted the fix/link-password-unhandled branch October 14, 2026 06:59
@openclouders openclouders mentioned this pull request Oct 14, 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.

A link password the server rejects causes an unhandled error

2 participants