mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 20:15:07 +08:00
show detailed error message
This commit is contained in:
parent
58e2903177
commit
b138b92d39
@ -34,12 +34,12 @@ impl Display for DocumentFormatError {
|
|||||||
match self {
|
match self {
|
||||||
Self::Internal(e) => write!(f, "An internal error has occurred. `{}`.", e),
|
Self::Internal(e) => write!(f, "An internal error has occurred. `{}`.", e),
|
||||||
Self::MalformedPayload(me, b) => match me.borrow() {
|
Self::MalformedPayload(me, b) => match me.borrow() {
|
||||||
milli::documents::Error::JsonError(_) => write!(
|
milli::documents::Error::JsonError(se) => write!(
|
||||||
f,
|
f,
|
||||||
"The `{}` payload provided is malformed. line: {}",
|
"The `{}` payload provided is malformed. `Couldn't serialize document value. at line {} column {}`",
|
||||||
b, "TODO"
|
b,se.line(),se.column()
|
||||||
),
|
),
|
||||||
_ => write!(f, "The `{}` payload provided is malformed. line: {}", b, me),
|
_ => write!(f, "The `{}` payload provided is malformed. `{}`.", b, me),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user