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

Warn when registering search attributes fails #107

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

dandavison
Copy link
Contributor

How tested

I tested that it compiled and the log message was formatted appropriately when I created a fake error:

	err = errors.New("an error")
WARN    cmd/run_scenario.go:139 Error ignored when registering search attributes: an error

@@ -132,6 +132,9 @@ func (r *scenarioRunner) run(ctx context.Context) error {
},
Namespace: r.clientOptions.Namespace,
})
if err != nil {
r.logger.Warnf("Error ignored when registering search attributes: %v", err)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

%w created something more inscrutable so I didn't use that:

Error ignored when registering search attributes: %!w(*errors.errorString=&{an error})

@dandavison dandavison merged commit 1db6523 into main Aug 7, 2024
9 checks passed
@dandavison dandavison deleted the log-warning-on-error branch August 7, 2024 21:49
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.

2 participants