12 lines
275 B
Go
12 lines
275 B
Go
package chat
|
|
|
|
import "fmt"
|
|
|
|
func (msg *MessageError) Error() string {
|
|
if description, ok := msg.Description.Get(); ok {
|
|
return fmt.Sprintf("other party sent error: %d %s", msg.Error, description)
|
|
} else {
|
|
return fmt.Sprintf("other party sent error: %d", msg.Code)
|
|
}
|
|
}
|