Improve error description in influxdb_v2 output (#4952)

This commit is contained in:
Greg 2018-11-02 18:50:55 -06:00 committed by Daniel Nelson
parent 9035505e08
commit ad5fcf8efb
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ func (c *httpClient) Write(ctx context.Context, metrics []telegraf.Metric) error
err = json.NewDecoder(resp.Body).Decode(writeResp)
desc := writeResp.Error()
if err != nil {
desc = err.Error()
desc = resp.Status
}
switch resp.StatusCode {