Replace IncorrectValue with InvalidValue

This commit is contained in:
Ian Manske
2024-09-29 20:47:00 -07:00
parent 1f47d72e86
commit 9a2a86399c
18 changed files with 183 additions and 208 deletions

View File

@@ -17,10 +17,10 @@ fn get_compression(call: &EvaluatedCall) -> Result<Option<AvroCompression>, Shel
match compression.as_ref() {
"snappy" => Ok(Some(AvroCompression::Snappy)),
"deflate" => Ok(Some(AvroCompression::Deflate)),
_ => Err(ShellError::IncorrectValue {
msg: "compression must be one of deflate or snappy".to_string(),
val_span: span,
call_span: span,
_ => Err(ShellError::InvalidValue {
valid: "'deflate' or 'snappy'".into(),
actual: format!("'{compression}'"),
span,
}),
}
} else {