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

v3/integrations/nrpkgerrors: support errorAttributer interface #409

Closed
eightnoteight opened this issue Nov 15, 2021 · 1 comment · Fixed by #441 or #497
Closed

v3/integrations/nrpkgerrors: support errorAttributer interface #409

eightnoteight opened this issue Nov 15, 2021 · 1 comment · Fixed by #441 or #497

Comments

@eightnoteight
Copy link

eightnoteight commented Nov 15, 2021

currently nrpkgerrors supports errorClasser even though pkg/errors doesn't support errorClasser. I'm assuming that this is done so that any extensions on top of pkg/errors that add support for errorClasser will continue to work with nrpkgerrors.Wrap as well.

but unfortunately the same is not true for errorAttributer interface. nrpkgerrors wraps the error but if that error supports errorAttributer then that information would get lost.

Desired Behaviour

if any error that supports errorAttributer interface is wrapped by nrpkgerrors.Wrap then the final wrapped error should also support errorAttributer interface.

Possible Solution

add a call to a helper function below this line here that checks if the incoming error supports errorAttributer interface, if so then use the attributes given by that error.

@eightnoteight eightnoteight changed the title v3/integrations/nrpkgerrors: support errorAttributer v3/integrations/nrpkgerrors: support errorAttributer interface Nov 15, 2021
@nr-swilloughby nr-swilloughby added this to Awaiting User Input in Go Engineering Board via automation Nov 30, 2021
@nr-swilloughby nr-swilloughby moved this from Awaiting User Input to Triage in Go Engineering Board Nov 30, 2021
@RichVanderwal
Copy link
Contributor

HI @eightnoteight , thanks for your thorough description and solution suggestion! I'll make sure our Product Managers sees this so we can help prioritize our product roadmap for next year.

@Ak-x Ak-x moved this from Triage to To Do in Go Engineering Board Jan 4, 2022
@iamemilio iamemilio moved this from To Do to In progress in Go Engineering Board Jan 24, 2022
@iamemilio iamemilio self-assigned this Jan 24, 2022
@iamemilio iamemilio moved this from In progress to Code Review in Go Engineering Board Jan 26, 2022
Go Engineering Board automation moved this from Code Review to Done May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants