Skip to content

Commit

Permalink
feat: include request url in the datasource unexpected status code er…
Browse files Browse the repository at this point in the history
…ror message (#243)

Co-authored-by: Dmytro Kozlov <[email protected]>
  • Loading branch information
chenlujjj and dmitryk-dk authored Jan 15, 2025
1 parent 95a5d5b commit 79c7521
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## tip

* FEATURE: include request url in the `got unexpected response status code` error message for troubleshooting.
Thanks to @chenlujjj for [the pull request](https://github.com/VictoriaMetrics/victoriametrics-datasource/pull/243).

* BUGFIX: fix issue with variables not working in adhoc filters. See [this issue](https://github.com/VictoriaMetrics/victoriametrics-datasource/issues/235).

## [v0.10.3](https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/tag/v0.10.3)
Expand All @@ -22,7 +25,7 @@

* BUGFIX: fixed healthcheck

## [v0.10.0](https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/tag/v0.10.0)
## [v0.10.0](https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/tag/v0.10.0)

* FEATURE: set the default query type to `instant` when creating alerting rules. See [this issue](https://github.com/VictoriaMetrics/victoriametrics-datasource/issues/205).

Expand All @@ -40,7 +43,7 @@
## [v0.8.5](https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/tag/v0.8.5)

* BUGFIX: restore support for Grafana versions below `10.0.0`. See [this issue](https://github.com/VictoriaMetrics/victoriametrics-datasource/issues/159).
* BUGFIX: fix issue with forwarding headers from datasource to the backend or proxy.
* BUGFIX: fix issue with forwarding headers from datasource to the backend or proxy.
It might be helpful if a user wants to use some kind of authentication. See [this issue](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/54).

## [v0.8.4](https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/tag/v0.8.4)
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (d *Datasource) query(ctx context.Context, query backend.DataQuery) backend
}()

if resp.StatusCode != http.StatusOK {
err = fmt.Errorf("got unexpected response status code: %d", resp.StatusCode)
err = fmt.Errorf("got unexpected response status code: %d with request url: %q", resp.StatusCode, reqURL)
return newResponseError(err, backend.Status(resp.StatusCode))
}

Expand Down

0 comments on commit 79c7521

Please sign in to comment.