13 lines
294 B
Go
13 lines
294 B
Go
package ymt_v3_2
|
|
|
|
import "fmt"
|
|
|
|
type APIError struct {
|
|
Code int32 `json:"code"`
|
|
Message string `json:"message"`
|
|
Reason string `json:"reason,omitempty"`
|
|
}
|
|
|
|
func (e *APIError) Error() string {
|
|
return fmt.Sprintf("API error: code=%d, message=%s, reason=%s", e.Code, e.Message, e.Reason)
|
|
} |