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

This commit is contained in:
Kyle Brandt 2023-07-19 09:52:49 -04:00 committed by GitHub
parent c99225e5ef
commit ebc6288191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
}