Skip to content

Commit 9427413

Browse files
committed
readme file updated
1 parent 029fa58 commit 9427413

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,26 @@ A lightweight, production-ready error handling toolkit for Express.js applicatio
1414

1515
It provides:
1616

17-
- Custom error classes (`NotFoundError`, `BadRequestError`, etc.)
17+
- Custom error classes (`NotFoundError`, `BadRequestError`, `ValidationError`, etc.)
1818
- Express middleware: `globalErrorHandler`, `notFoundHandler`
19-
- An `asyncHandler` utility to handle async errors without boilerplate
19+
- An `asyncHandler` utility to catch async route errors without boilerplate
20+
- A flexible `httpError()` factory function
21+
- `isCustomAPIError()` type guard for better type safety
2022
- Re-exported utilities from [`http-status-toolkit`](https://www.npmjs.com/package/http-status-toolkit) — no need to install it separately
2123

24+
---
25+
2226
## ✨ Features
2327

2428
- ✅ Type-safe custom error classes
25-
- ✅ Centralized error-handling middleware
29+
- ✅ Centralized global error handler
2630
- ✅ Async error wrapper for route handlers
27-
- ✅ Built-in 404 (Not Found) handler
28-
- ✅ Out-of-the-box support for both CJS and ESM
31+
- ✅ Built-in 404 handler for unknown routes
32+
-`httpError()` factory for dynamic error creation
33+
-`isCustomAPIError()` type guard for safe narrowing
2934
- ✅ Includes `http-status-toolkit` exports (like `StatusCodes`)
35+
- ✅ Works with both CommonJS and ESM
36+
- ✅ First-class TypeScript support
3037

3138
---
3239

0 commit comments

Comments
 (0)