package model import "fmt" type Error struct { Code int Message string Detail string Raw []byte } func (e *Error) Error() string { return e.Message } func (e *Error) Debug() string { return fmt.Sprintf("%s\n%s", e.Detail, string(e.Raw)) }