From 4887d41ae7682311ba247bb0ba7825ef77a2d86d Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Tue, 21 Jul 2026 15:18:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6:=20ymt=5Fv?= =?UTF-8?q?3=5F2/errors.go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ymt_v3_2/errors.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ymt_v3_2/errors.go diff --git a/ymt_v3_2/errors.go b/ymt_v3_2/errors.go new file mode 100644 index 0000000..562d8d2 --- /dev/null +++ b/ymt_v3_2/errors.go @@ -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) +} \ No newline at end of file