From 195cf136e3a7de2b2720261dfd459c051b5be037 Mon Sep 17 00:00:00 2001 From: Joey Harrington Date: Thu, 28 Apr 2022 17:19:16 -0700 Subject: [PATCH] fix: Correct typo in assertion message (#1904) --- lib/chain.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/chain.js b/lib/chain.js index c1acf4f2..c1c08cb6 100644 --- a/lib/chain.js +++ b/lib/chain.js @@ -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 ' + @@ -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).' ); }