Skip to content
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

Catch development store errors during init #1281

Merged
merged 3 commits into from
Aug 29, 2023
Merged

Conversation

graygilmore
Copy link
Contributor

@graygilmore graygilmore commented Aug 28, 2023

WHY are these changes introduced?

When developers go through the init flow and try to create a storefront on a Development Store we throw an unhelpful error.

WHAT is this pull request doing?

This updates the code to explicitly catch that error and return possible reasons for why it failed. The API throws this error for a number of reasons so we're listing them all out instead of just mentioning Development Stores.

image

HOW to test your changes?

Run the init command and try to connect to a shop that's on a Development Store plan.

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Member

@max611 max611 left a comment

Choose a reason for hiding this comment

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

Small comment but LGTM

We're about to add another case to this so I'm cleaning it up ahead of
time to make the functional diff easier to read.
Developers are hitting this error when they try to create a new
Hydrogen storefront on a Development Store. This catches that error and
provides some better feedback on why it failed.
@graygilmore
Copy link
Contributor Author

Force Push Patch Notes

  • Added toMatch assertions to the error messages to make sure our testing paths are exhaustive

@graygilmore graygilmore merged commit 1a7762b into main Aug 29, 2023
9 checks passed
@graygilmore graygilmore deleted the gg-handle-dev-stores branch August 29, 2023 16:31
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