Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correct typo in assertion message #1904

Merged
merged 1 commit into from Apr 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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