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

Use errs.JoinMessage() when sending errors to Rollbar or the log. #3267

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

mitchell-as
Copy link
Contributor

@mitchell-as mitchell-as commented Apr 29, 2024

TaskDX-2740 Ensure `multilog.Error()` calls use `errs.JoinMessage(err)` instead of just `err`.

@github-actions github-actions bot changed the base branch from version/0-44-0-RC1 to version/0-45-0-RC1 April 29, 2024 15:27
@mitchell-as mitchell-as marked this pull request as ready for review April 29, 2024 19:09
Comment on lines 248 to 250
if err, ok := arg.(error); ok {
args[i] = errs.JoinMessage(err)
}
Copy link
Member

Choose a reason for hiding this comment

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

This switch is already a type-check, so I think it makes sense to move this to an case rather than use the default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are correct. I was thinking if the error was something like a locale.WrappedError, the arg.(type) would not go into a case error. However, the debugger proved otherwise and I learned something new. Thanks for pointing this out!

@mitchell-as mitchell-as merged commit 47fe917 into version/0-45-0-RC1 Apr 30, 2024
7 checks passed
@mitchell-as mitchell-as deleted the mitchell/dx-2740 branch April 30, 2024 16:34
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