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

refactor: adds more specific log errors for amt activation #569

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

Craig-Spencer-12
Copy link
Contributor

@Craig-Spencer-12 Craig-Spencer-12 commented Jun 25, 2024

Adds error logs for

  • non base64 cert
  • non cert base64
  • wrong cert password
  • invalid cert
  • wsman message errors (acm and ccm)
  • base64 encoding errors
  • invalid control mode

@Craig-Spencer-12 Craig-Spencer-12 force-pushed the localACMLogging branch 2 times, most recently from 3942d0f to ae14115 Compare June 25, 2024 07:52
@Craig-Spencer-12 Craig-Spencer-12 linked an issue Jun 25, 2024 that may be closed by this pull request
Copy link
Member

@rsdmike rsdmike left a comment

Choose a reason for hiding this comment

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

Since we log error messages in the handleErrorAndExit function in main.go, Instead of adding an additional log message, in which case the same error gets logged twice (i.e. line 282) -- create new errors in the utils, with the added detail and a new status codes so that library users have more information. We absolutely want to overcrowd the constants.go with single use errors. This is especially true to centralize error messages, so we can easily translate them in the future.

@Craig-Spencer-12 Craig-Spencer-12 merged commit 9cb1261 into main Jul 2, 2024
13 checks passed
@Craig-Spencer-12 Craig-Spencer-12 deleted the localACMLogging branch July 2, 2024 21:13
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.

Improved logging for local ACM activation
2 participants