Skip to content

Commit

Permalink
polish:完善错误提醒内容
Browse files Browse the repository at this point in the history
  • Loading branch information
NICEXAI committed Jul 28, 2021
1 parent 67cef08 commit cec50e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const (
SDKAccessTokenInvalid Error = "AccessToken 无效"
// SDKAccessTokenExpired 错误码:42001
SDKAccessTokenExpired Error = "AccessToken 已过期"
// SDKWeWorkAlready 错误码:95011
SDKWeWorkAlready Error = "已在企业微信使用微信客服"
)

//输出错误信息
Expand All @@ -41,6 +43,8 @@ func NewSDKErr(code int, msgList ...string) Error {
return SDKAccessTokenExpired
case 40014:
return SDKAccessTokenInvalid
case 95011:
return SDKWeWorkAlready
default:
//返回未知的自定义错误
if len(msgList) > 0 {
Expand Down

0 comments on commit cec50e9

Please sign in to comment.