diff --git a/go.mod b/go.mod index 274313c..05a38a1 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 github.com/goccy/go-json v0.10.2 github.com/hashicorp/go-multierror v1.1.1 - github.com/ice-blockchain/eskimo v1.185.0 + github.com/ice-blockchain/eskimo v1.186.0 github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb github.com/ice-blockchain/wintr v1.125.0 github.com/imroc/req/v3 v3.42.2 diff --git a/go.sum b/go.sum index 1882310..f6b564c 100644 --- a/go.sum +++ b/go.sum @@ -301,8 +301,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ice-blockchain/eskimo v1.185.0 h1:+qXOktkEnlDmE0wOiLZC6Tcp5wp4eJdbCZeHSsaY4uA= -github.com/ice-blockchain/eskimo v1.185.0/go.mod h1:wjt+BudjNYu6y2wRwUK8HKgPPPTi77WLRUG2Sp4ZCZM= +github.com/ice-blockchain/eskimo v1.186.0 h1:04SAmvmIePHOcckQNItC8miif2lKnOEu/J8o1gYtm3g= +github.com/ice-blockchain/eskimo v1.186.0/go.mod h1:wjt+BudjNYu6y2wRwUK8HKgPPPTi77WLRUG2Sp4ZCZM= github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb h1:8TnFP3mc7O+tc44kv2e0/TpZKnEVUaKH+UstwfBwRkk= github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb/go.mod h1:ZsQU7i3mxhgBBu43Oev7WPFbIjP4TniN/b1UPNGbrq8= github.com/ice-blockchain/wintr v1.125.0 h1:pk/SVyztstUF19+JDCufJRMXJeNpchVA4O26xp47l3Y= diff --git a/tokenomics/kyc.go b/tokenomics/kyc.go index 345e3f0..631ee73 100644 --- a/tokenomics/kyc.go +++ b/tokenomics/kyc.go @@ -204,7 +204,7 @@ func (r *repository) overrideKYCStateWithEskimoKYCState(ctx context.Context, use } }). SetRetryCondition(func(resp *req.Response, err error) bool { - return err != nil || (resp.GetStatusCode() != http.StatusOK && resp.GetStatusCode() != http.StatusUnauthorized) + return err != nil || (resp.GetStatusCode() != http.StatusOK && resp.GetStatusCode() != http.StatusUnauthorized && resp.GetStatusCode() != http.StatusForbidden) //nolint:lll // . }). AddQueryParam("caller", "freezer-refrigerant"). SetHeader("Authorization", authorization(ctx)). @@ -215,6 +215,8 @@ func (r *repository) overrideKYCStateWithEskimoKYCState(ctx context.Context, use SetHeader("Expires", "0"). Post(fmt.Sprintf("%v/users/%v", r.cfg.KYC.TryResetKYCStepsURL, userID)); err != nil { return errors.Wrapf(err, "failed to fetch eskimo user state for userID:%v", userID) + } else if statusCode := resp.GetStatusCode(); statusCode != http.StatusOK { + return errors.Errorf("[%v]failed to fetch eskimo user state for userID:%v", statusCode, userID) } else if data, err2 := resp.ToBytes(); err2 != nil { return errors.Wrapf(err2, "failed to read body of eskimo user state request for userID:%v", userID) } else {