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
@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants