Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
change error message
Browse files Browse the repository at this point in the history
  • Loading branch information
gyson committed Oct 30, 2015
1 parent fe32dd4 commit 27e50c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = convert

function convert (mw) {
if (typeof mw !== 'function') {
throw new TypeError(mw + ' is not function')
throw new TypeError('middleware must be a function')
}
if (mw.constructor.name === 'GeneratorFunction') {
return function (ctx, next) {
Expand Down

0 comments on commit 27e50c7

Please sign in to comment.