Skip to content

Commit e4ee432

Browse files
committed
feat:完善文件上传相关错误信息
1 parent 362d985 commit e4ee432

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

error.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ const (
1717
SDKUnknownError Error = "未知错误"
1818
// SDKInvalidCredential 错误码:40001
1919
SDKInvalidCredential Error = "不合法的secret参数"
20+
// SDKInvalidImageSize 错误码:40009
21+
SDKInvalidImageSize Error = "无效的图片大小"
2022
// SDKInvalidCorpID 错误码:40013
2123
SDKInvalidCorpID Error = "无效的 CorpID"
2224
// SDKAccessTokenInvalid 错误码:40014
2325
SDKAccessTokenInvalid Error = "AccessToken 无效"
26+
// SDKMediaIDExceedMinLength 错误码:40058
27+
SDKMediaIDExceedMinLength Error = "media_id 小于最小长度 1"
2428
// SDKAccessTokenMissing 错误码:41001
2529
SDKAccessTokenMissing Error = "缺少AccessToken参数"
2630
// SDKAccessTokenExpired 错误码:42001
@@ -51,6 +55,8 @@ func NewSDKErr(code int, msgList ...string) Error {
5155
return SDKCacheUnavailable
5256
case 40001:
5357
return SDKInvalidCredential
58+
case 40009:
59+
return SDKInvalidImageSize
5460
case 41001:
5561
return SDKAccessTokenMissing
5662
case 42001:
@@ -59,6 +65,8 @@ func NewSDKErr(code int, msgList ...string) Error {
5965
return SDKInvalidCorpID
6066
case 40014:
6167
return SDKAccessTokenInvalid
68+
case 40058:
69+
return SDKMediaIDExceedMinLength
6270
case 45009:
6371
return SDKApiFreqOutOfLimit
6472
case 48002:

0 commit comments

Comments
 (0)