From 1ee2ff1d30d718360ec3a0a74e1043eac9a3246e Mon Sep 17 00:00:00 2001 From: Yaodong Yu <2814461814@qq.com> Date: Sat, 17 Dec 2022 21:10:20 +0800 Subject: [PATCH] feat: now dingtalk OAuth returns all error messages to frontend (#1405) --- idp/dingtalk.go | 2 ++ 1 file changed, 2 insertions(+) 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 }