chore: fix error message for deserialization (#885)

This commit is contained in:
Nishant Joshi
2023-04-21 02:50:13 +05:30
committed by GitHub
parent 96f9e8068b
commit e4d0dd0a38

View File

@ -36,7 +36,9 @@ pub async fn create_customer(
.peek() .peek()
.clone() .clone()
.parse_value("AddressDetails") .parse_value("AddressDetails")
.change_context(errors::ApiErrorResponse::AddressNotFound)?; .change_context(errors::ApiErrorResponse::InvalidDataValue {
field_name: "address",
})?;
db.insert_address(storage::AddressNew { db.insert_address(storage::AddressNew {
city: customer_address.city, city: customer_address.city,
country: customer_address.country, country: customer_address.country,