Skip to content

Commit

Permalink
Lowercase bail! error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tontinton committed Dec 6, 2024
1 parent 43ab70b commit 4e083f3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/workflow/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn filter_ast_to_vrl(ast: &FilterAst) -> String {

fn run_vrl_filter(program: &Program, log: Log) -> Result<bool> {
let Value::Boolean(allowed) = run_vrl(program, log)? else {
bail!("Response of VRL script not boolean");
bail!("response of VRL script not boolean");
};
Ok(allowed)
}
Expand Down
2 changes: 1 addition & 1 deletion src/workflow/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn project_fields_to_vrl(fields: &[ProjectField]) -> String {

fn run_vrl_project(program: &Program, log: Log) -> Result<Log> {
let Value::Object(map) = run_vrl(program, log)? else {
bail!("Response of VRL script not object");
bail!("response of VRL script not object");
};
Ok(map)
}
Expand Down
2 changes: 1 addition & 1 deletion src/workflow/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async fn collect_logs(by: &[KeyString], mut input_stream: LogStream) -> Result<V
if let Some(t) = tracked_type {
if *t != value_type {
bail!(
"Cannot sort over differing types (key '{}'): {:?} != {:?}",
"cannot sort over differing types (key '{}'): {:?} != {:?}",
key,
*t,
value_type
Expand Down
2 changes: 1 addition & 1 deletion src/workflow/summarize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async fn summarize_group_by(
if let Some(t) = tracked_type {
if *t != value_type {
bail!(
"Cannot summarize over differing types (key '{}'): {:?} != {:?}",
"cannot summarize over differing types (key '{}'): {:?} != {:?}",
key,
*t,
value_type
Expand Down
2 changes: 1 addition & 1 deletion src/workflow/vrl_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub fn compile_pretty_print_errors(script: &str) -> Result<Program> {
Err(diagnostics) => {
println!("Errors:");
pretty_print_diagnostics(&diagnostics);
bail!("Failed to compile VRL script:\n{}", script);
bail!("failed to compile VRL script:\n{}", script);
}
}
}
Expand Down

0 comments on commit 4e083f3

Please sign in to comment.