From 3b087db6acd5d7f31e3b7d2087bd6fad9034eaf6 Mon Sep 17 00:00:00 2001 From: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com> Date: Tue, 30 Mar 2021 10:58:08 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20cli=20error=20message=20when=20installin?= =?UTF-8?q?g=20plugin=20doesn't=20include=20helpful=E2=80=A6=20(#32467)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix: cli error message when installing plugin doesn't include helpful info * Update pkg/cmd/grafana-cli/services/api_client.go Co-authored-by: Arve Knudsen Co-authored-by: Arve Knudsen --- pkg/cmd/grafana-cli/services/api_client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/grafana-cli/services/api_client.go b/pkg/cmd/grafana-cli/services/api_client.go index cdb49e26019..6c8da5ca8d0 100644 --- a/pkg/cmd/grafana-cli/services/api_client.go +++ b/pkg/cmd/grafana-cli/services/api_client.go @@ -28,7 +28,8 @@ func (client *GrafanaComClient) GetPlugin(pluginId, repoUrl string) (models.Plug body, err := sendRequestGetBytes(HttpClient, repoUrl, "repo", pluginId) if err != nil { if errors.Is(err, ErrNotFoundError) { - return models.Plugin{}, errutil.Wrap("Failed to find requested plugin, check if the plugin_id is correct", err) + return models.Plugin{}, errutil.Wrap( + fmt.Sprintf("Failed to find requested plugin, check if the plugin_id (%s) is correct", pluginId), err) } return models.Plugin{}, errutil.Wrap("Failed to send request", err) }