From 22758e4745368b13bec9d1f10389d2b19e537cc7 Mon Sep 17 00:00:00 2001 From: Puskar Basu <45908484+pskrbasu@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:15:16 +0530 Subject: [PATCH] Show connection name along with error message. Closes #684 --- plugin/query_data.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/query_data.go b/plugin/query_data.go index f15e0a02..749255b6 100644 --- a/plugin/query_data.go +++ b/plugin/query_data.go @@ -19,6 +19,7 @@ import ( "github.com/turbot/steampipe-plugin-sdk/v5/plugin/quals" "github.com/turbot/steampipe-plugin-sdk/v5/query_cache" "github.com/turbot/steampipe-plugin-sdk/v5/rate_limiter" + "github.com/turbot/steampipe-plugin-sdk/v5/sperr" "github.com/turbot/steampipe-plugin-sdk/v5/telemetry" "golang.org/x/exp/maps" "golang.org/x/sync/semaphore" @@ -832,7 +833,7 @@ func (d *QueryData) streamRow(row *proto.Row) { func (d *QueryData) streamError(err error) { log.Printf("[WARN] QueryData StreamError %v (%s)", err, d.connectionCallId) - d.errorChan <- err + d.errorChan <- sperr.WrapWithMessage(err, d.Connection.Name) } // TODO KAI this seems to get called even after cancellation