From db79671e1de1bcdd0c73da5328b64e90ec2a8d67 Mon Sep 17 00:00:00 2001 From: Ajaykn-mac Date: Mon, 26 Sep 2022 12:59:57 +0900 Subject: [PATCH] Fix impersonation token error in case of missing site_admin scope --- src/push.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/push.go b/src/push.go index ecfcfc6..ecd29d7 100644 --- a/src/push.go +++ b/src/push.go @@ -82,7 +82,7 @@ func GetImpersonationToken(ctx context.Context, flags *PushFlags) (string, error fmt.Printf("these are the scopes we have for the current token `%s` ...\n", scopesHeader) if !strings.Contains(scopesHeader, "site_admin") { - return "", errors.Wrap(err, "the current token doesn't have the `site_admin` scope, the impersonation function requires the `site_admin` permission to be able to impersonate.") + return "", errors.New("the current token doesn't have the `site_admin` scope, the impersonation function requires the `site_admin` permission to be able to impersonate.") } isAE := rootResponse.Header.Get(enterpriseVersionHeaderKey) == enterpriseAegisVersionHeaderValue