Skip to content
This repository was archived by the owner on Aug 12, 2022. It is now read-only.

fix: Fixed print of diag errors#436

Closed
amanenk wants to merge 1 commit intocloudquery:mainfrom
amanenk:fix_diags
Closed

fix: Fixed print of diag errors#436
amanenk wants to merge 1 commit intocloudquery:mainfrom
amanenk:fix_diags

Conversation

@amanenk
Copy link
Contributor

@amanenk amanenk commented Jul 23, 2022

Summary

fixed print of provider configuration error when error is in diags.


Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

t.Fatal("failed to configure provider", configErr)
} else if resp != nil && resp.Diagnostics.HasErrors() {
t.Fatal("errors while configuring provider", configErr)
t.Fatal("errors while configuring provider", resp.Diagnostics.Error())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should we print only errors in resp.Diagnostics.Error function or it is ok to print all the diags?

@yevgenypats
Copy link
Contributor

We are going to remove diags. so let's hold with any code that touches it atm. there are a lot of bugs related to that but they will partially go away with #437

@amanenk amanenk closed this Jul 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants