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

Improve error handling #147

Merged
merged 7 commits into from Oct 7, 2020
Merged

Improve error handling #147

merged 7 commits into from Oct 7, 2020

Conversation

aliscott
Copy link
Member

@aliscott aliscott commented Oct 7, 2020

Show better error messages for:

  • Terraform binary missing
  • An unsupported Terraform version is used
  • The dir isn't a Terraform dir
  • Plan/JSON file does not exist
  • Terraform vars are missing
  • Terraform var file does not exist
  • Any error returned from Terraform binary
  • Any internal panic

Copy link
Member

@alikhajeh1 alikhajeh1 left a comment

Choose a reason for hiding this comment

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

LGTM, this is a huge usability improvement - thank you :)

internal/providers/terraform/aws/ecs_service.go Outdated Show resolved Hide resolved
cmd/infracost/default.go Show resolved Hide resolved
internal/providers/terraform/provider.go Outdated Show resolved Hide resolved
internal/providers/terraform/provider.go Outdated Show resolved Hide resolved
internal/providers/terraform/provider.go Outdated Show resolved Hide resolved
internal/providers/terraform/provider.go Outdated Show resolved Hide resolved
internal/providers/terraform/provider.go Outdated Show resolved Hide resolved
internal/providers/terraform/provider.go Outdated Show resolved Hide resolved
Co-authored-by: Ali Khajeh-Hosseini <alikhajeh1@googlemail.com>

Update internal/providers/terraform/provider.go

Co-authored-by: Ali Khajeh-Hosseini <alikhajeh1@googlemail.com>

Apply suggestions from code review

Co-authored-by: Ali Khajeh-Hosseini <alikhajeh1@googlemail.com>

refactor(errors): code review changes
@aliscott
Copy link
Member Author

aliscott commented Oct 7, 2020

Fixes #146

@aliscott aliscott merged commit 7f5f527 into master Oct 7, 2020
@aliscott aliscott deleted the refactor/improve-errors branch October 7, 2020 16:40
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.

None yet

2 participants