Skip to content
New issue

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

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

Already on GitHub? # 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

@graygilmore graygilmore force-pushed the gg-handle-dev-stores branch from 8672e4d to d139b74 Compare August 28, 2023 18:36
@graygilmore graygilmore marked this pull request as ready for review August 28, 2023 18:41
@graygilmore graygilmore requested review from aswamy and frandiox August 28, 2023 18:41
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 graygilmore force-pushed the gg-handle-dev-stores branch from d139b74 to 818ea9b Compare August 29, 2023 16:27
@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
@graygilmore graygilmore deleted the gg-handle-dev-stores branch August 29, 2023 16:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants