-
Notifications
You must be signed in to change notification settings - Fork 35
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
add message to '.Error()' output for LsError #623
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc @reshnm |
achimweigel
reviewed
Oct 20, 2022
achimweigel
reviewed
Oct 20, 2022
@In-Ko You have pull request review open invite, please check |
/test |
Testrun: e2e-njlmt +--------------------+--------------------+-----------+----------+ | NAME | STEP | PHASE | DURATION | +--------------------+--------------------+-----------+----------+ | create-cluster | create-cluster | Succeeded | 3m11s | | create-registry | create-registry | Succeeded | 2m41s | | install-landscaper | install-landscaper | Succeeded | 44s | | integration-test | test | Failed | 6m4s | | delete-cluster | delete-cluster | Omitted | 0s | | delete-registry | delete-registry | Omitted | 0s | +--------------------+--------------------+-----------+----------+ |
c2a3bf6
to
13d6505
Compare
achimweigel
approved these changes
Oct 26, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/logging
Logging related
kind/enhancement
Enhancement, improvement, extension
needs/ok-to-test
Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD)
priority/3
Priority (lower number equals higher priority)
reviewed/lgtm
Has approval for merging
size/xs
Size of pull request is tiny (see gardener-robot robot/bots/size.py)
status/closed
Issue is closed (either delivered or triaged)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to categorize this PR?
/area logging
/kind enhancement
/priority 3
What this PR does / why we need it:
When wrapping an
error
in an object of typeLsError
, a message can be specified. Calling.Error()
on the LsError object returns only the original error message, though. If this LsError object is then again wrapped, neither.Message
, nor.Error()
called on the new object will return the message specified during the first wrapping. This results in a loss of potentially interesting information.To fix this, the
.Error()
implementation of LsError has been enhanced in theLsError
type: Instead of just returning.Error()
of the internalerror
, it will now return a combination of.Message
and.Error()
. It also checks if former one already contains the latter one, to avoid duplicate errors.Release note: