Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

fix: Diagnostics should always include error message #198

Merged
merged 4 commits into from
Mar 2, 2022

Conversation

disq
Copy link
Member

@disq disq commented Mar 2, 2022

No description provided.

@github-actions github-actions bot added the fix label Mar 2, 2022
@disq disq requested a review from bbernays March 2, 2022 13:15
Copy link
Contributor

@bbernays bbernays left a comment

Choose a reason for hiding this comment

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

LGTM other than one question

@@ -60,7 +60,12 @@ func (e BaseError) Description() Description {
summary := e.summary
if e.summary == "" {
summary = e.Error()
} else if e.err != nil {
if es := e.err.Error(); es != summary {
summary += ": " + es
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure about this, but is there ever a time we could have such deeply nested errors that the summary field overflows?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don’t think it’s an issue, there are definitely times when the err is too large (thats where the WithError will
come in with an updated/simplified underlying error, overridden by the error classifier… See my next gcp commit when I get back)

@disq disq merged commit 20ae1b8 into main Mar 2, 2022
@disq disq deleted the fix/diags-always-include-error-msg branch March 2, 2022 17:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants