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

fix: Classify UnrecognizedClientException as Access error #862

Merged

Conversation

roneli
Copy link
Contributor

@roneli roneli commented May 8, 2022

πŸŽ‰ Thank you for making CloudQuery awesome by submitting a PR πŸŽ‰

Summary


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

  • Read the contribution guidelines πŸ§‘β€πŸŽ“
  • Run go fmt to format your code πŸ–Š
  • Update or add tests. Learn more about testing here πŸ§ͺ
  • Update the docs by running go run ./docs/docs.go and committing the changes πŸ“ƒ
  • If adding a new resource, add relevant Terraform files in a separate PR πŸ“‚
  • Ensure the status checks below are successful βœ…

@roneli roneli requested a review from a team as a code owner May 8, 2022 08:32
@roneli roneli requested review from disq and removed request for a team May 8, 2022 08:32
@github-actions github-actions bot added fix and removed fix labels May 8, 2022
@roneli roneli merged commit 6dbfbc1 into cloudquery:main May 8, 2022
@roneli roneli deleted the fix/recognize_invalid_token_as_access branch May 8, 2022 16:23
@@ -30,10 +30,24 @@ func classifyError(err error, fallbackType diag.Type, accounts []Account, opts .
diag.WithType(diag.ACCESS),
diag.WithSeverity(diag.WARNING),
ParseSummaryMessage(err),
diag.WithDetails("%s", errorCodeDescriptions[ae.ErrorCode()]),
diag.WithDetails(errorCodeDescriptions[ae.ErrorCode()]),
Copy link
Member

Choose a reason for hiding this comment

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

This is incorrect: if the description contains a % char it will end up being formatted as an invalid message.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants