Skip to content

Commit 1021f4d

Browse files
committed
ready to publish v1.2.1
1 parent 64b3013 commit 1021f4d

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ This project adheres to [Semantic Versioning](https://semver.org) and follows [C
55

66
---
77

8+
## [1.2.1](https://github.com/dev-rashedin/express-error-toolkit/releases/tag/1.2.1) – 2025-10-25
9+
10+
### ♻️ Fixed
11+
- 🛠️ **Favicon request noise** — Added an internal check in `globalErrorHandler` to silently handle `/favicon.ico` requests, preventing unnecessary 404 logs when browsers auto-request the favicon.
12+
- ✅ Improved console cleanliness when running Express apps on ports previously used by frontend frameworks (e.g., Next.js, React).
13+
14+
815
## [1.2.0](https://github.com/dev-rashedin/express-error-toolkit/releases/tag/1.2.0) – 2025-08-09
916

1017
### ♻️ Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "express-error-toolkit",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "A lightweight and developer-friendly toolkit for robust error handling in Express.js applications.\nIncludes ready-to-use custom error classes, an async route error handler wrapper, a global error handler middleware, and a convenient 'not found' route handler.\nDesigned to simplify error management, reduce boilerplate, and improve app reliability — all with TypeScript support and easy integration.",
55
"author": "Rashedin Islam <[email protected]>",
66
"license": "MIT",

src/global-error-handler.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ let errorOptions: ErrorOptions = {
2222
process.env.SHOW_STACK !== 'false' && process.env.NODE_ENV !== 'production',
2323
logError:
2424
process.env.LOG_ERROR !== 'false' && process.env.NODE_ENV !== 'production',
25+
autoSuccessLog:
26+
process.env.AUTO_SUCCESS_LOG !== 'false' && process.env.NODE_ENV !== 'production',
2527
introLine: `💥 Even the best code breaks sometimes! Let's debug...`,
2628
};
2729

@@ -32,7 +34,7 @@ export function setErrorOptions(options: Partial<ErrorOptions>) {
3234
};
3335
}
3436

35-
37+
// TODO
3638

3739

3840

@@ -42,7 +44,7 @@ export const globalErrorHandler = (
4244
res: Response,
4345
_next: NextFunction
4446
) => {
45-
// 🚫 Ignoring harmless favicon.ico errors
47+
// Ignoring harmless favicon.ico errors
4648
if (_req.originalUrl === '/favicon.ico') {
4749
return res.status(204).end();
4850
}

src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export interface ErrorOptions {
22
showStack: boolean;
33
logError: boolean;
44
introLine: string | boolean;
5+
autoSuccessLog: boolean;
56
}
67

78
export interface ErrorResponse {

0 commit comments

Comments
 (0)