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

OCM-4965: Secure store tweaks #905

Merged
merged 1 commit into from
Feb 13, 2024
Merged

Conversation

tylercreller
Copy link
Member

  • Add test for invalid and empty keyrings
  • Additional Error Standardization
  • Add support that allows the caller to define a keyring to target
  • Add error handling for denied Keychain access due to permissions

@tirthct tirthct merged commit 1118e3f into openshift-online:main Feb 13, 2024
3 checks passed
}

if strings.Contains(err.Error(), "Keychain Error. (-25244)") {
return fmt.Errorf("%s\nThis application may not have permission to delete from the Keychain. Please check the permissions in the Keychain and try again", err.Error())
Copy link

@macgregor macgregor Feb 14, 2024

Choose a reason for hiding this comment

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

Friendly reminder that when wrapping errors your should use "%w" rather than %s or %v to properly preserve the original error (which potentially includes a stack trace) in case callers want it: https://gosamples.dev/wrap-unwrap-errors/

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.

3 participants