From ebc62881910eb6c8172c7ecdc464bea7fec61881 Mon Sep 17 00:00:00 2001 From: Kyle Brandt Date: Wed, 19 Jul 2023 09:52:49 -0400 Subject: [PATCH] errutil: (Chore) Make PublicError fulfill error (#71945) --- pkg/util/errutil/errors.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/util/errutil/errors.go b/pkg/util/errutil/errors.go index 1238427c200..09b833acfe5 100644 --- a/pkg/util/errutil/errors.go +++ b/pkg/util/errutil/errors.go @@ -251,3 +251,8 @@ func (e Error) Public() PublicError { Extra: e.PublicPayload, } } + +// Error implements the error interface. +func (p PublicError) Error() string { + return fmt.Sprintf("[%s] %s", p.MessageID, p.Message) +}