diff --git a/README.md b/README.md index 4d2c586..42f797b 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ As you can see in the following screenshots, the error presented by Youch is a l - Raw stack trace + Unformatted stack trace @@ -53,7 +53,7 @@ As you can see in the following screenshots, the error presented by Youch is a l - Youch Output + Youch output @@ -165,6 +165,8 @@ The top-most section displays the Error info, which includes: +--- + ### Stack trace The Stack trace section displays individual frames as accordion sections. Clicking on the section title reveals the frame source code. The source code is unavailable for native stack frames that are part of the Node.js, Deno, and Bun internals. @@ -176,6 +178,8 @@ The Stack trace section displays individual frames as accordion sections. Clicki +--- + For the ANSI output, only the first frame from the application code is expanded to show the source code.
@@ -185,6 +189,8 @@ For the ANSI output, only the first frame from the application code is expanded
+--- + ### Raw output Clicking the `Raw` button displays the Error object in its raw form, with all the error properties (not just the stack trace). @@ -198,6 +204,8 @@ The raw output may be helpful for errors that contain additional properties. HTT +--- + In case of ANSI output, you can view the raw output using the `YOUCH_RAW` environment variable. For example: `YOUCH_RAW=true node your-script.js`.
@@ -207,6 +215,8 @@ In case of ANSI output, you can view the raw output using the `YOUCH_RAW` enviro
+--- + ### Error cause [Error cause](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) is a standard way to bubble errors while wrapping them within a generic error. Youch displays the error cause as an interactive property within its own section. @@ -218,6 +228,8 @@ In case of ANSI output, you can view the raw output using the `YOUCH_RAW` enviro +--- + For the ANSI output, the nested properties are shown upto the two levels deep. However, you can adjust the depth using the `YOUCH_CAUSE` environment variable. For example: `YOUCH_CAUSE=4 node your-script.js`.
@@ -227,6 +239,8 @@ For the ANSI output, the nested properties are shown upto the two levels deep. H
+--- + ### Metadata (HTML only) Metadata refers to any additional data that you want to display on the error page. It could be the HTTP request headers, the logged-in user info, or the list of available application routes.