Map UserErrors for GDSN errors instead of Payload
UserError makes more sense here since the error prefix will be "Error: "
instead of "PayloadError: ". The errors from this module are almost
always going to be validation errors or not well-formed errors.
@@ -127,6 +127,6 @@ impl From<sabre_sdk::protos::ProtoConversionError> for CliError {
#[cfg(feature = "product-gdsn")]
impl From<grid_sdk::products::gdsn::error::ProductGdsnError> for CliError {
fn from(err: grid_sdk::products::gdsn::error::ProductGdsnError) -> Self {
- CliError::PayloadError(err.to_string())
+ CliError::UserError(err.to_string())
}
}
