From 6bfcd35579732699df3a75d6d5ea420baf33f8ac 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 b518d6c807775..4fcf76616685e 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 {