mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-04 04:12:55 +00:00
fix: improve error message in validate_proto_value (#2328)
* fix: correct error message in validate_proto_value() * fix: print location in InvalidRequest error * style: format
This commit is contained in:
@@ -186,7 +186,12 @@ pub enum Error {
|
||||
location: Location,
|
||||
},
|
||||
|
||||
#[snafu(display("Invalid request to region {}, reason: {}", region_id, reason))]
|
||||
#[snafu(display(
|
||||
"Invalid request to region {}, location: {}, reason: {}",
|
||||
region_id,
|
||||
location,
|
||||
reason
|
||||
))]
|
||||
InvalidRequest {
|
||||
region_id: RegionId,
|
||||
reason: String,
|
||||
|
||||
@@ -360,10 +360,11 @@ pub(crate) fn validate_proto_value(
|
||||
InvalidRequestSnafu {
|
||||
region_id,
|
||||
reason: format!(
|
||||
"column {} has type {:?}, but schema has type {:?}",
|
||||
column_schema.column_name,
|
||||
"value has type {:?}, but column {} has type {:?}({})",
|
||||
value_type,
|
||||
ColumnDataType::from_i32(column_schema.datatype)
|
||||
column_schema.column_name,
|
||||
ColumnDataType::from_i32(column_schema.datatype),
|
||||
column_schema.datatype,
|
||||
),
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user