Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix(sg): return different error types depending on secret failure#63779

Merged
jhchabran merged 4 commits into
mainfrom
wb/sg-improve-err-msg
Jul 11, 2024
Merged

fix(sg): return different error types depending on secret failure#63779
jhchabran merged 4 commits into
mainfrom
wb/sg-improve-err-msg

Conversation

@burmudar

Copy link
Copy Markdown
Contributor

If we failed getting a secret via a tool - we return CommandErr which contains SecretErr
If we failed getting a secret via Google - we return GoogleSecretErr which contains SecretErr

Depending on the error we get while trying to persist Analytics we suggest different fixes the user can try.

Below is how it looks when we get a GoogleSecretErr

Screenshot 2024-07-11 at 11 11 40

Test plan

Tested locally

Changelog

If we failed getting a secret via a tool - we return CommandErr which
contains SecretErr
If we failed getting a secret via Google - we return GoogleSecretErr
which contains SecretErr

Depending on the error we get while trying to persist Analytics we
suggest different fixes the user can try.
@burmudar burmudar requested a review from a team July 11, 2024 09:17
@burmudar burmudar self-assigned this Jul 11, 2024
@cla-bot cla-bot Bot added the cla-signed label Jul 11, 2024
@burmudar burmudar changed the title sg: return different error types depending on secret failure fix(sg): return different error types depending on secret failure Jul 11, 2024

@jhchabran jhchabran left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice! Good call!

Requested changes, because left-over + need some godoc 🙏

Comment thread dev/sg/internal/secrets/store.go
Comment thread dev/sg/internal/secrets/store.go Outdated
Comment thread dev/sg/internal/secrets/store.go Outdated
@burmudar burmudar requested a review from jhchabran July 11, 2024 14:27
@jhchabran jhchabran merged commit ccae82a into main Jul 11, 2024
@jhchabran jhchabran deleted the wb/sg-improve-err-msg branch July 11, 2024 16:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants