You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
eightnoteight
changed the title
v3/integrations/nrpkgerrors: support errorAttributer
v3/integrations/nrpkgerrors: support errorAttributer interface
Nov 15, 2021
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.
currently nrpkgerrors supports
errorClasser
even thoughpkg/errors
doesn't supporterrorClasser
. I'm assuming that this is done so that any extensions on top ofpkg/errors
that add support forerrorClasser
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 supportserrorAttributer
then that information would get lost.Desired Behaviour
if any error that supports
errorAttributer
interface is wrapped bynrpkgerrors.Wrap
then the final wrapped error should also supporterrorAttributer
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.
The text was updated successfully, but these errors were encountered: