Skip to content

Conversation

@Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Oct 9, 2025

  • Resolves: #

Summary

When saving share, there's already a try-catch block to handle process and UI changes:

	let share
	try {
		this.creating = true
		share = await this.addShare(incomingShare)
	} catch {
		this.creating = false
		// Error is already handled by ShareRequests mixin
		return
	}

but this.addShare also have a try-catch, and if error happens there, it's not exposed to this.saveShare, and further handling fails.

Steps to reproduce (one of the ways):

  • set password policy (always ask for password, e.t.c.)
  • input invalid password
  • click 'Save share'

Results wih this PR:

  • UI is reset, request failed, toast message (invalid password) is shown

Results without this PR:

  • UI is stuck in creating state, request failed, saveShare proceed further, share is undefined

Checklist

@Antreesy Antreesy added this to the Nextcloud 33 milestone Oct 9, 2025
@Antreesy Antreesy self-assigned this Oct 9, 2025
@Antreesy Antreesy requested a review from a team as a code owner October 9, 2025 15:53
@Antreesy Antreesy added bug 3. to review Waiting for reviews labels Oct 9, 2025
@Antreesy Antreesy requested review from nfebe, sorbaugh and susnux and removed request for a team October 9, 2025 15:53
@Antreesy Antreesy requested review from CarlSchwan and removed request for sorbaugh October 9, 2025 15:55
@Antreesy
Copy link
Contributor Author

Antreesy commented Oct 9, 2025

/compile rebase

@nextcloud-command nextcloud-command force-pushed the fix/noid/throw-failed-share branch from d3c44e5 to ca06651 Compare October 9, 2025 16:26
@Antreesy Antreesy force-pushed the fix/noid/throw-failed-share branch from ca06651 to a4d440e Compare October 14, 2025 07:28
@Antreesy
Copy link
Contributor Author

/compile

Signed-off-by: nextcloud-command <[email protected]>
@Antreesy Antreesy merged commit 8659002 into master Oct 14, 2025
148 of 153 checks passed
@Antreesy Antreesy deleted the fix/noid/throw-failed-share branch October 14, 2025 09:03
@Antreesy
Copy link
Contributor Author

/backport to stable32

@Antreesy
Copy link
Contributor Author

/backport to stable31

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.

5 participants