show detailed error message
@@ -34,12 +34,12 @@ impl Display for DocumentFormatError {
match self {
Self::Internal(e) => write!(f, "An internal error has occurred. `{}`.", e),
Self::MalformedPayload(me, b) => match me.borrow() {
- milli::documents::Error::JsonError(_) => write!(
+ milli::documents::Error::JsonError(se) => write!(
f,
- "The `{}` payload provided is malformed. line: {}",
- b, "TODO"
+ "The `{}` payload provided is malformed. `Couldn't serialize document value. at line {} column {}`",
+ b,se.line(),se.column()
),
- _ => write!(f, "The `{}` payload provided is malformed. line: {}", b, me),
+ _ => write!(f, "The `{}` payload provided is malformed. `{}`.", b, me),
},
}
}
