influxdb-rs / influxdb-rust

Rust Client for the InfluxDB Time Series Database
https://crates.io/crates/influxdb
MIT License
245 stars 79 forks source link

Include InfluxDB error string in crate errors #152

Open Empty2k12 opened 5 months ago

Empty2k12 commented 5 months ago

In #150 error types were adapted, however it would be good to adapt the errors even further to include the error string returned from the InfluxDB API. Such an error response can look as follows "{ \"code\":\"invalid\",\"message\":\"failed to parse query: found MEASUREMENT, expected FROM, WHERE at line 1, char 8\"}" and it should be decided if only the message or the whole response body should be included in the error.