Skip to content

On app selection keep retrying when failing but avoid capturing unrelated errors#6904

Merged
alfonso-noriega merged 1 commit intomainfrom
02-27-on_app_selecetion_keep_retrying_when_failing_but_avoid_capturing_unrelated_errors
Mar 2, 2026
Merged

On app selection keep retrying when failing but avoid capturing unrelated errors#6904
alfonso-noriega merged 1 commit intomainfrom
02-27-on_app_selecetion_keep_retrying_when_failing_but_avoid_capturing_unrelated_errors

Conversation

@alfonso-noriega
Copy link
Contributor

@alfonso-noriega alfonso-noriega commented Feb 27, 2026

WHY are these changes introduced?

Vault Error

GH Issue #15725

Observe link

The app selection logic contained redundant error handling and retry mechanisms that were making the code unnecessarily complex and potentially masking actual issues during the selection process.

WHAT is this pull request doing?

  • Removes redundant error checking in selectAppPrompt function that was checking for null after using the non-null assertion operator
  • Simplifies the retry logic in selectOrCreateApp by removing try-catch blocks and letting natural control flow handle retries
  • Updates error message from "interrupted" to "failed" to better reflect the actual failure condition
  • Streamlines the app selection flow while maintaining the same retry behavior

How to test your changes?

  1. Run shopify app dev in a project directory
  2. Go through the app selection prompt
  3. Verify that app selection works normally
  4. Test edge cases where app selection might fail to ensure retry logic still functions
  5. Confirm error messages are clear and helpful when selection ultimately fails

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 78.86% 14521/18414
🟡 Branches 73.17% 7225/9874
🟡 Functions 79.04% 3691/4670
🟡 Lines 79.2% 13727/17331

Test suite run success

3788 tests passing in 1448 suites.

Report generated by 🧪jest coverage report action from f3d32ce

@alfonso-noriega alfonso-noriega force-pushed the 02-27-on_app_selecetion_keep_retrying_when_failing_but_avoid_capturing_unrelated_errors branch from f35bc45 to 47e6658 Compare February 27, 2026 12:53
@alfonso-noriega alfonso-noriega marked this pull request as ready for review February 27, 2026 12:58
@alfonso-noriega alfonso-noriega requested a review from a team as a code owner February 27, 2026 12:58
@github-actions
Copy link
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@binks-code-reviewer
Copy link

binks-code-reviewer bot commented Feb 27, 2026

🤖 Code Review · #projects-dev-ai for questions
React with 👍/👎 or reply — all feedback helps improve the agent.

Complete - No issues

📋 History

✅ 2 findings → ✅ No issues → ✅ No issues → ✅ No issues → ✅ No issues → ✅ No issues

@gonzaloriestra gonzaloriestra changed the title On app selecetion keep retrying when failing but avoid capturing unrelated errors On app selection keep retrying when failing but avoid capturing unrelated errors Mar 2, 2026
Copy link
Contributor

@isaacroldan isaacroldan left a comment

Choose a reason for hiding this comment

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

Let's remove the ! and handle the undefined selected app outside

@alfonso-noriega alfonso-noriega force-pushed the 02-27-on_app_selecetion_keep_retrying_when_failing_but_avoid_capturing_unrelated_errors branch from 47e6658 to d1c840f Compare March 2, 2026 11:00
@alfonso-noriega alfonso-noriega force-pushed the 02-27-on_app_selecetion_keep_retrying_when_failing_but_avoid_capturing_unrelated_errors branch 5 times, most recently from ee4e139 to d914c87 Compare March 2, 2026 13:48
@alfonso-noriega alfonso-noriega force-pushed the 02-27-on_app_selecetion_keep_retrying_when_failing_but_avoid_capturing_unrelated_errors branch from d914c87 to f3d32ce Compare March 2, 2026 15:58
@alfonso-noriega alfonso-noriega added this pull request to the merge queue Mar 2, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 2, 2026
@alfonso-noriega alfonso-noriega added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit d8414e0 Mar 2, 2026
25 checks passed
@alfonso-noriega alfonso-noriega deleted the 02-27-on_app_selecetion_keep_retrying_when_failing_but_avoid_capturing_unrelated_errors branch March 2, 2026 17:47
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.

2 participants