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(cli): error message for non-existent tf cloud orgs #3207

Closed

Conversation

howdoicomputer
Copy link
Contributor

@howdoicomputer howdoicomputer commented Oct 28, 2023

Related issue

Fixes #2982

Description

If a user is not actively part of an organization in Terraform Cloud then the CLI will error out with a stacktrace that obfuscates the problem. This bug fix returns a happy error message instead.

A user not being part of an organization may be common if they're going through tutorials.

Checklist

  • I have updated the PR title to match CDKTF's style guide
  • I have run the linter on my code locally
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works if applicable
  • New and existing unit tests pass locally with my changes

@hashicorp-cla
Copy link

hashicorp-cla commented Oct 28, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@DanielMSchmidt DanielMSchmidt left a comment

Choose a reason for hiding this comment

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

Thanks a ton! That error message will be so much better!

packages/cdktf-cli/src/bin/cmds/helper/init.ts Outdated Show resolved Hide resolved
@howdoicomputer
Copy link
Contributor Author

Happy to help!

@DanielMSchmidt
Copy link
Contributor

Hey, thanks for your help! I moved this into a different PR so that I could run prettier :)

Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: [select prompt] No selectable choices. All choices are disabled.
4 participants