Skip to content

Commit 195cf13

Browse files
authoredApr 29, 2022
fix: Correct typo in assertion message (#1904)
1 parent 0a8cf83 commit 195cf13

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎lib/chain.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Chain.prototype.add = function add(handler) {
8080
handler.constructor.name,
8181
'AsyncFunction',
8282
`Handler [${handlerId}] is missing a third argument (the ` +
83-
'"next" callback) but is not an async function. Middlware ' +
83+
'"next" callback) but is not an async function. Middleware ' +
8484
'handlers can be either async/await or callback-based.' +
8585
'Callback-based (non-async) handlers should accept three ' +
8686
'arguments: (req, res, next). Async handler functions should ' +
@@ -92,11 +92,11 @@ Chain.prototype.add = function add(handler) {
9292
handler.constructor.name,
9393
'AsyncFunction',
9494
`Handler [${handlerId}] accepts a third argument (the 'next" ` +
95-
'callback) but is also an async function. Middlware handlers ' +
96-
'can be either async/await or callback-based. Async handler ' +
97-
'functions should accept maximum of 2 arguments: (req, res). ' +
98-
'Non-async handlers should accept three arguments: (req, ' +
99-
'res, next).'
95+
'callback) but is also an async function. Middleware ' +
96+
'handlers can be either async/await or callback-based. Async ' +
97+
'handler functions should accept maximum of 2 arguments: ' +
98+
'(req, res). Non-async handlers should accept three ' +
99+
'arguments: (req, res, next).'
100100
);
101101
}
102102

0 commit comments

Comments
 (0)
Please sign in to comment.