From c8895cab774a13efeec39edadbf9a0d3ec8f0019 Mon Sep 17 00:00:00 2001 From: LiuHanCheng <2463765697@qq.com> Date: Tue, 8 Mar 2022 12:03:59 +0800 Subject: [PATCH] Update meilisearch-lib/src/document_formats.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Renault --- meilisearch-lib/src/document_formats.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meilisearch-lib/src/document_formats.rs b/meilisearch-lib/src/document_formats.rs index b458a124e..b169cdf99 100644 --- a/meilisearch-lib/src/document_formats.rs +++ b/meilisearch-lib/src/document_formats.rs @@ -32,14 +32,14 @@ pub enum DocumentFormatError { impl Display for DocumentFormatError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 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() { milli::documents::Error::JsonError(se) => write!( f, - "The `{}` payload provided is malformed. `Couldn't serialize document value. at line {} column {}`", - b,se.line(),se.column() + "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. `{}`.", b, me), + _ => write!(f, "The `{}` payload provided is malformed: `{}`.", b, me), }, } }