From da3d5a807f3df62cd9ca47e1eeafaf9c346e583e Mon Sep 17 00:00:00 2001
From: Joey Harrington <jharrington@netflix.com>
Date: Thu, 28 Apr 2022 16:17:09 -0700
Subject: [PATCH] fix: Correct typo in assertion message

---
 lib/chain.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/chain.js b/lib/chain.js
index c1acf4f2b..c1c08cb69 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).'
         );
     }