添加文件: ymt_v3_2/errors.go

This commit is contained in:
renzhiyuan 2026-07-21 15:18:57 +08:00
parent db6a614a88
commit 4887d41ae7
1 changed files with 13 additions and 0 deletions

13
ymt_v3_2/errors.go Normal file
View File

@ -0,0 +1,13 @@
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)
}