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

fix: ensure the hubOrg passes is actually a DevHub, throw error if not #669

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

WillieRuemmele
Copy link
Member

What does this PR do?

throws a nicer error message when the hubOrg is not actually enabled as a DevHub

Before

ERROR running force:org:create: The requested resource does not exist

After

ERROR running force:org:create: Ensure that org, with id: [email protected] and username 00D530000008eONEAY is enabled as a DevHub

*Messaging to be reviewed by Juliet

What issues does this PR fix or reference?

@W-11838125@

Co-authored-by: Juliet Shackell <[email protected]>
@@ -277,6 +277,9 @@ export const requestScratchOrgCreation = async (
scratchOrgRequest: ScratchOrgInfo,
settings: SettingsGenerator
): Promise<SaveResult> => {
if (!hubOrg.isDevHubOrg()) {
Copy link
Member

Choose a reason for hiding this comment

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

note: this method relies on the isDevHub prop to be set in the auth file, this prop is set based on a server check when creating and saving the auth file after this change was merged: #560 (comment)

if a user auth'd to a hub before that change ⬆️ was merged and starts to get the error then a re-auth should solve it.

Copy link
Member

Choose a reason for hiding this comment

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

@WillieRuemmele @cristiand391, this is doing a good job of informing customers of the problem (see @W-11791190). That's great! Now when they enable the org as a devhub, we need to help them know to re-auth.

Can we add a note about that? Can we link to an FAQ? Can we provide a --update-devhub-status option to the some command?

@cristiand391 cristiand391 merged commit 753292f into main Oct 13, 2022
@cristiand391 cristiand391 deleted the wr/devHubIsNotDevHub branch October 13, 2022 13:39
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.

4 participants