Skip to content

Update error message for other errors during account linking - #2510

Merged
chaitanyapotti merged 2 commits into
masterfrom
fix/account-linking-error-prefix
Jun 2, 2026
Merged

Update error message for other errors during account linking#2510
chaitanyapotti merged 2 commits into
masterfrom
fix/account-linking-error-prefix

Conversation

@lionellbriones

@lionellbriones lionellbriones commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Jira Link

Description

Update error message for other errors during account linking

  • show error codes for non AccountLinkingError type if available
  • add Account linking error prepend

How has this been tested?

Screenshots (if appropriate)

Before - when type of error is not AccountLinkingError we plainly show the error message

Screenshot 2026-06-02 at 11 23 37 PM Screenshot 2026-06-02 at 10 09 54 PM

After

If error is Web3Auth error. we prepend it with `[CODE] Account linking error: {message}
Screenshot 2026-06-02 at 11 25 56 PM

For other errors (no error code). we just prepend it `Account linking error:
Screenshot 2026-06-02 at 11 36 36 PM

Note: we don't show UI for unlinking so we only have Account linking error: prepend

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Note

Low Risk
Small change to error string formatting in account linking with no auth or API behavior changes; only user-visible error text differs for some error types.

Overview
formatAccountLinkingErrorMessage now standardizes user-facing copy for non–AccountLinkingError failures during account linking.

Other Web3AuthError instances (not AccountLinkingError) are formatted as [code] Account linking error: {message}, so error codes still appear when the underlying failure is a Web3Auth error type. Plain Error values are prefixed with Account linking error: instead of showing only the raw message. AccountLinkingError and JSON/fallback paths are unchanged.

Tests were updated to expect the new generic Error string.

Reviewed by Cursor Bugbot for commit 657d6b8. Bugbot is set up for automated code reviews on this repo. Configure here.

@lionellbriones
lionellbriones requested a review from a team as a code owner June 2, 2026 15:39
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web3auth-web Ready Ready Preview, Comment Jun 2, 2026 3:51pm

Request Review

lwin-kyaw
lwin-kyaw previously approved these changes Jun 2, 2026
@chaitanyapotti
chaitanyapotti merged commit 786e8b5 into master Jun 2, 2026
7 checks passed
@chaitanyapotti
chaitanyapotti deleted the fix/account-linking-error-prefix branch June 2, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants