diff --git a/idp/dingtalk.go b/idp/dingtalk.go index 5818a2dc..5b782f9e 100644 --- a/idp/dingtalk.go +++ b/idp/dingtalk.go @@ -256,6 +256,8 @@ func (idp *DingTalkIdProvider) isUserInOrg(unionId string) (bool, error) { } if data.ErrCode == 60121 { return false, fmt.Errorf("the user is not found in the organization where clientId and clientSecret belong") + } else if data.ErrCode != 0 { + return false, fmt.Errorf(data.ErrMessage) } return true, nil }