errutil: (Chore) Make PublicError fulfill error (#71945)

This commit is contained in:
Kyle Brandt authored and GitHub committed 2023-07-19 09:52:49 -04:00
1 parent c99225e5ef
commit ebc6288191
1 file changed
+5
+5
View File
@@ -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)
}