Skip to content

Commit

Permalink
chore: cr issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shuiyisong committed Jan 8, 2025
1 parent 983c626 commit 86ea81b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/servers/src/http/loki.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,11 @@ pub fn parse_loki_labels(labels: &str) -> Result<BTreeMap<String, String>> {
// parse value
let qs = quoted_string::parse::<TestSpec>(labels)
.map_err(|e| {
error!(e.1; "failed to parse quoted string");
InvalidLokiLabelsSnafu {
msg: format!("failed to parse quoted string near: {}", labels),
msg: format!(
"failed to parse quoted string near: {}, reason: {}",
labels, e.1
),
}
.build()
})?
Expand All @@ -331,9 +333,8 @@ pub fn parse_loki_labels(labels: &str) -> Result<BTreeMap<String, String>> {
labels = &labels[qs.len()..];

let value = quoted_string::to_content::<TestSpec>(qs).map_err(|e| {
error!(e; "failed to unquote the string");
InvalidLokiLabelsSnafu {
msg: format!("failed to unquote the string: {}", qs),
msg: format!("failed to unquote the string: {}, reason: {}", qs, e),
}
.build()
})?;
Expand Down

0 comments on commit 86ea81b

Please sign in to comment.