Skip to content

Commit

Permalink
SQL: Set relevant errors to downstream (#1159)
Browse files Browse the repository at this point in the history
* Set relevant errors to downstream

* Revert source change
  • Loading branch information
aangelisc authored Dec 5, 2024
1 parent 7ef35b2 commit 3ecf138
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/sqlutil/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"database/sql"
"fmt"

"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/data"
)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3ecf138

Please sign in to comment.