File tree Expand file tree Collapse file tree 5 files changed +21
-2
lines changed Expand file tree Collapse file tree 5 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,15 @@ This project adheres to [Semantic Versioning](https://semver.org) and follows [C
55
66---
77
8+ ## [ 1.1.1] ( https://github.com/dev-rashedin/express-error-toolkit/releases/tag/1.1.1 ) – 2025-07-19
9+
10+ ### ✨ Improvements
11+
12+ - Console now logs the ` statusCode ` with styled ANSI output.
13+ - Further improved DX for debugging and tracing errors during development.
14+
15+ ---
16+
817## [ 1.1.0] ( https://github.com/dev-rashedin/express-error-toolkit/releases/tag/1.1.0 ) – 2025-07-18
918
1019### ✨ Improvements
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ Each part of the error log is color-coded using a traffic light scheme:
143143
144144> Here's an example of how your console might look in development:
145145
146- ![ Colored error output preview] ( ./assets/console-preview.png )
146+ ![ Colored error output preview] ( ./assets/console-preview-1.1.1 .png )
147147
148148If needed, you can disable this output using either ` .env ` or ` setErrorOptions() ` :
149149
File renamed without changes.
Original file line number Diff line number Diff line change @@ -73,14 +73,21 @@ export const globalErrorHandler = (
7373
7474 // Log the error if configured to do so
7575 if ( errorOptions . logError ) {
76+ // log the error status
7677 console . error (
7778 `${ boldRed ( '🔴 Error Status:' ) } ${ red ( String ( errorResponse . status ) ) } `
7879 ) ;
80+
81+ console . error ( ) ; // empty line for better readability
82+
83+ // log the error message
7984 console . error (
80- `${ boldRed ( '🔴 Error Message:' ) } ${ red ( String ( errorResponse . message ) ) } `
85+ `${ boldRed ( '🔴 Error Message:' ) } ${ red ( ( errorResponse . message ) ) } `
8186 ) ;
8287
88+ console . error ( ) ; // empty line for better readability
8389
90+ // Log error details if available
8491 if ( errorResponse . errorDetails ) {
8592 console . error ( boldYellow ( '🟡 Error Details:' ) ) ;
8693 console . error (
@@ -92,6 +99,9 @@ export const globalErrorHandler = (
9299 ) ;
93100 }
94101
102+ console . error ( ) ; // empty line for better readability
103+
104+ // Log stack trace if available
95105 if ( errorResponse . stack ) {
96106 console . error ( boldGreen ( '🟢 Stack Trace:' ) ) ;
97107 ( errorResponse . stack as string [ ] ) . forEach ( ( line ) =>
You can’t perform that action at this time.
0 commit comments