Skip to content

Commit 4257db4

Browse files
committed
docs: update README
1 parent fa83def commit 4257db4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ While Next.js middleware is useful for global, high-level tasks, `nextjs-central
163163
164164
### Understanding Scope and Flexibility: Next.js Middleware vs. `nextjs-centralized-error-handler`
165165
166-
While Next.js middleware provides a powerful mechanism for high-level request interception, `nextjs-centralized-error-handler` excels at fine-grained error handling within individual API routes. This section clarifies their distinct roles and how they can be used together effectively.
166+
While Next.js middleware provides a powerful mechanism for high-level request interception, it’s important to note that middleware operates **before** the execution of the route handler. This means that any exceptions thrown inside the handler will not be caught by the middleware; instead, this will lead to a generic 500 Internal Server Error being returned to the client. In contrast, `nextjs-centralized-error-handler` excels at fine-grained error handling within individual API routes. This section clarifies their distinct roles and demonstrates how they can be used together effectively.
167167
168168
#### Scenario: User Input Validation
169169

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-centralized-error-handler",
3-
"version": "1.0.11",
3+
"version": "1.0.12",
44
"main": "src/index.js",
55
"scripts": {
66
"test": "jest",

0 commit comments

Comments
 (0)