Skip to content

Conversation

@bfullam
Copy link
Contributor

@bfullam bfullam commented Jul 23, 2025

Description

Matches the existing implementation of error details in extension.

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

  1. Go to Solana swaps
  2. Get quote that fails simulation
  3. See improved error details

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@bfullam bfullam requested a review from a team as a code owner July 23, 2025 16:50
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-swaps-and-bridge Swaps and Bridge team label Jul 23, 2025
@bfullam bfullam added QA Passed QA testing has been completed and passed Run Smoke E2E labels Jul 23, 2025
@github-actions
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: e580c4c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/636e577e-ec27-4d67-a57f-aad50e91b533

Note

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: e2b59fb
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ee06c1c4-1dca-4d24-adf3-4cac619cf911

Note

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 23, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 052be77
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/218687e5-9161-4226-a8a3-ded1e470c599

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Error Handling Mixes API Structures

The error handling logic inconsistently mixes new and old API response structures. While the primary error check now uses validationResult.status === 'ERROR', the code still attempts to access validationResult.result.validation.reason and validationResult.error for fallback messages and error type determination. If these older properties are undefined in the new API structure, the errorMessage passed to the error modal can become undefined, leading to display issues. Additionally, the hardcoded "The " prefix and "." suffix around error_details.message can result in grammatically incorrect or redundant error messages.

app/components/UI/Bridge/Views/BridgeView/index.tsx#L282-L297

});
if (validationResult.status === 'ERROR') {
displayValidationError = true;
const isValidationError =
!!validationResult.result.validation.reason;
const { error_details } = validationResult;
const fallbackErrorMessage = isValidationError
? validationResult.result.validation.reason
: validationResult.error;
navigation.navigate(Routes.BRIDGE.MODALS.ROOT, {
screen: Routes.BRIDGE.MODALS.BLOCKAID_MODAL,
params: {
errorType: isValidationError ? 'validation' : 'simulation',
errorMessage: error_details?.message
? `The ${error_details.message}.`
: fallbackErrorMessage,

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

github-actions bot commented Jul 24, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 8d60a31
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b7fbf848-0700-4e83-929d-c370a968de58

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@bfullam bfullam added this pull request to the merge queue Jul 24, 2025
Merged via the queue into main with commit 40e0bd5 Jul 24, 2025
72 of 76 checks passed
@bfullam bfullam deleted the swaps-improved-blockaid-error-details branch July 24, 2025 14:28
@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2025
@metamaskbot metamaskbot added the release-7.53.0 Issue or pull request that will be included in release 7.53.0 label Jul 24, 2025
@metamaskbot metamaskbot added release-7.52.0 Issue or pull request that will be included in release 7.52.0 and removed release-7.53.0 Issue or pull request that will be included in release 7.53.0 labels Sep 3, 2025
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

10 similar comments
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.52.0 on PR, as PR was cherry-picked in branch 7.52.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

QA Passed QA testing has been completed and passed release-7.52.0 Issue or pull request that will be included in release 7.52.0 team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants