fix: Keep ParseError's description private; use Display instead
This gives us more flexibility to refactor ParseError in the future.pull/24376/head
parent
ac5ecb01dc
commit
38b39eb095
|
@ -155,7 +155,7 @@ pub struct Pair {
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct ParseError {
|
pub struct ParseError {
|
||||||
pub description: String,
|
description: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for ParseError {
|
impl fmt::Display for ParseError {
|
||||||
|
|
|
@ -264,7 +264,7 @@ async fn send_series_filters(
|
||||||
.db
|
.db
|
||||||
.read_points(org_id, bucket_id, predicate, range)
|
.read_points(org_id, bucket_id, predicate, range)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| Status::internal(format!("error reading db: {}", err.description)))?;
|
.map_err(|err| Status::internal(format!("error reading db: {}", err)))?;
|
||||||
|
|
||||||
let mut last_frame_key = String::new();
|
let mut last_frame_key = String::new();
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ async fn send_series_filters(
|
||||||
if last_frame_key != batch.key {
|
if last_frame_key != batch.key {
|
||||||
last_frame_key = batch.key.clone();
|
last_frame_key = batch.key.clone();
|
||||||
let tags = index_pairs(&batch.key)
|
let tags = index_pairs(&batch.key)
|
||||||
.map_err(|err| Status::invalid_argument(err.description))?
|
.map_err(|err| Status::invalid_argument(err.to_string()))?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|p| Tag {
|
.map(|p| Tag {
|
||||||
key: p.key.bytes().collect(),
|
key: p.key.bytes().collect(),
|
||||||
|
|
Loading…
Reference in New Issue