Skip to content

Gracefully handle system errors while updating a draft extension #5902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gonzaloriestra
Copy link
Contributor

@gonzaloriestra gonzaloriestra commented May 23, 2025

WHY are these changes introduced?

When the CLI gets a 500 error while updating a draft, it's crashing in a bad way:

Monosnap -zsh 2025-05-23 12-50-17

WHAT is this pull request doing?

Catch any error and print them properly without stopping the dev session:

Monosnap cloudflared 2025-05-23 12-46-18

How to test your changes?

Run p shopify app dev against Partners and very quickly update an extension many times until you get an error, or break the json of a locale

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

@gonzaloriestra gonzaloriestra force-pushed the handle-update-draft-errors branch from f08f384 to ecd37d7 Compare May 23, 2025 10:55
@gonzaloriestra gonzaloriestra force-pushed the handle-update-draft-errors branch from ecd37d7 to 12c0857 Compare May 23, 2025 11:04
Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.01% (+0.01% 🔼)
12466/15980
🟡 Branches
72.15% (+0% 🔼)
6038/8369
🟡 Functions 78.28% 3272/4180
🟡 Lines
78.44% (+0.01% 🔼)
11794/15035
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / update-extension.ts
72.34% (-0.16% 🔻)
50% (-8.33% 🔻)
60%
76.19% (-0.95% 🔻)

Test suite run success

2866 tests passing in 1253 suites.

Report generated by 🧪jest coverage report action from 12c0857

@gonzaloriestra gonzaloriestra marked this pull request as ready for review May 23, 2025 13:00
@gonzaloriestra gonzaloriestra requested a review from a team as a code owner May 23, 2025 13:00
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.

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.

1 participant