From 99e7291e13b5b7e60d9ea62698b0981a93202a40 Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com> Date: Wed, 31 Jul 2024 09:46:03 +0200 Subject: [PATCH] Slightly improve MDX error message with Webpack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` тип ./app/blog/hello-world/page.mdx Error: page.mdx:Error: 7:1: Unexpected end of file in expression, expected a corresponding closing brace for `{` (markdown-rs:unexpected-eof) Import trace for requested module: ./app/blog/hello-world/page.mdx ``` --- crates/napi/src/mdx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/napi/src/mdx.rs b/crates/napi/src/mdx.rs index d370e1365ef83..3b9a9e942c95a 100644 --- a/crates/napi/src/mdx.rs +++ b/crates/napi/src/mdx.rs @@ -14,7 +14,7 @@ impl Task for MdxCompileTask { let options: Options = serde_json::from_slice(&self.option)?; compile(&self.input, &options) - .map_err(|err| napi::Error::new(Status::GenericFailure, format!("{:?}", err))) + .map_err(|err| napi::Error::new(Status::GenericFailure, err.to_string())) } fn resolve(&mut self, _env: Env, output: Self::Output) -> napi::Result {