Skip to content

Commit 67cef08

Browse files
committed
polish:完善错误提醒
1 parent 2cffead commit 67cef08

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

error.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const (
1717
SDKUnknownError Error = "未知错误"
1818
// SDKInvalidCredential 错误码:40001
1919
SDKInvalidCredential Error = "不合法的secret参数"
20+
// SDKAccessTokenInvalid 错误码:40014
21+
SDKAccessTokenInvalid Error = "AccessToken 无效"
2022
// SDKAccessTokenExpired 错误码:42001
2123
SDKAccessTokenExpired Error = "AccessToken 已过期"
2224
)
@@ -37,6 +39,8 @@ func NewSDKErr(code int, msgList ...string) Error {
3739
return SDKInvalidCredential
3840
case 42001:
3941
return SDKAccessTokenExpired
42+
case 40014:
43+
return SDKAccessTokenInvalid
4044
default:
4145
//返回未知的自定义错误
4246
if len(msgList) > 0 {

0 commit comments

Comments
 (0)