Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: Correct typo in assertion message (#1904)
  • Loading branch information
josephharrington committed Apr 29, 2022
1 parent 0a8cf83 commit 195cf13
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/chain.js
Expand Up @@ -80,7 +80,7 @@ Chain.prototype.add = function add(handler) {
handler.constructor.name,
'AsyncFunction',
`Handler [${handlerId}] is missing a third argument (the ` +
'"next" callback) but is not an async function. Middlware ' +
'"next" callback) but is not an async function. Middleware ' +
'handlers can be either async/await or callback-based.' +
'Callback-based (non-async) handlers should accept three ' +
'arguments: (req, res, next). Async handler functions should ' +
Expand All @@ -92,11 +92,11 @@ Chain.prototype.add = function add(handler) {
handler.constructor.name,
'AsyncFunction',
`Handler [${handlerId}] accepts a third argument (the 'next" ` +
'callback) but is also an async function. Middlware handlers ' +
'can be either async/await or callback-based. Async handler ' +
'functions should accept maximum of 2 arguments: (req, res). ' +
'Non-async handlers should accept three arguments: (req, ' +
'res, next).'
'callback) but is also an async function. Middleware ' +
'handlers can be either async/await or callback-based. Async ' +
'handler functions should accept maximum of 2 arguments: ' +
'(req, res). Non-async handlers should accept three ' +
'arguments: (req, res, next).'
);
}

Expand Down

0 comments on commit 195cf13

Please sign in to comment.