From 3ecf138a0afdf660a00ba8c65c6ebc6cfbecb10b Mon Sep 17 00:00:00 2001 From: Andreas Christou Date: Thu, 5 Dec 2024 12:02:25 +0000 Subject: [PATCH] SQL: Set relevant errors to downstream (#1159) * Set relevant errors to downstream * Revert source change --- data/sqlutil/sql.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/sqlutil/sql.go b/data/sqlutil/sql.go index e0eb0b4e6..4cc16b214 100644 --- a/data/sqlutil/sql.go +++ b/data/sqlutil/sql.go @@ -4,6 +4,7 @@ import ( "database/sql" "fmt" + "github.com/grafana/grafana-plugin-sdk-go/backend" "github.com/grafana/grafana-plugin-sdk-go/data" ) @@ -73,7 +74,7 @@ func FrameFromRows(rows *sql.Rows, rowLimit int64, converters ...Converter) (*da } if err := rows.Err(); err != nil { - return frame, err + return frame, backend.DownstreamError(err) } return frame, nil