From f86070169d5ab0df7767fcddf190047e3c204a32 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 1 Oct 2022 16:04:37 +0300 Subject: [PATCH] lib/promscrape/discovery/azure: remove unneeded conversion to string --- lib/promscrape/discovery/azure/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/promscrape/discovery/azure/api.go b/lib/promscrape/discovery/azure/api.go index 00791d009..3162df372 100644 --- a/lib/promscrape/discovery/azure/api.go +++ b/lib/promscrape/discovery/azure/api.go @@ -232,7 +232,7 @@ func getRefreshTokenFunc(sdc *SDConfig, ac, proxyAC *promauth.Config, env *cloud } var tr tokenResponse if err := json.Unmarshal(data, &tr); err != nil { - return "", 0, fmt.Errorf("cannot parse token auth response %q: %w", string(data), err) + return "", 0, fmt.Errorf("cannot parse token auth response %q: %w", data, err) } expiresInSeconds, err := strconv.ParseInt(tr.ExpiresIn, 10, 64) if err != nil {