Repository navigation
fix(web): return invite/accept errors as values instead of throwing - #566
Merged
gkhngyk merged 2 commits intoJul 31, 2026
Merged
Conversation
inviteMember and acceptInvitation threw on common, user-reachable
failures (duplicate invite, wrong account, expired token, etc.). In
production a thrown server action surfaces as the masked digest
string, hiding the actionable message. Both now return `{ error }`
and the call sites branch on it, following the pattern from ansvisor#536.
Closes ansvisor#550
gkhngyk
approved these changes
Jul 31, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Thanks — solid work again. The inline error on the accept card (instead of a toast) is exactly the right call. 🙌
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
inviteMemberandacceptInvitationthrew on common, user-reachable failures (duplicate invite, wrong account, expired token, invalid email, insert errors), which production masks as a digest string instead of showing the actionable message.{ error: string }instead of throwing, following the pattern from fix(prompts): surface savePromptSet failures instead of the masked digest error #536 (addPromptToBrand).team-section.tsxbranches on the invite result and toasts the error.accept-invitation-card.tsxbranches on the accept result and renders the error inline (inline beats a toast here since it tells the user what to do next, e.g. which account to sign in with).Closes #548
Test plan
tsc --noEmitpassesnpm run lintpasses