-
-
Notifications
You must be signed in to change notification settings - Fork 470
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
check variables existence #116
base: master
Are you sure you want to change the base?
check variables existence #116
Conversation
@@ -51,6 +51,8 @@ module.exports = function token(server, options) { | |||
if (!server) { throw new TypeError('oauth2orize.token middleware requires a server argument'); } | |||
|
|||
return function token(req, res, next) { | |||
if (!req.body) { return next(new Error('OAuth2orize requires body parsing. Did you forget app.use(express.bodyParser())?')); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
express does not bundle bodyParser any more. See http://expressjs.com/4x/api.html#req.body for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have only take error message in other file in this project. Effectivly,
errors messages and express example are outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. But this error message should probably be up to date before merging.
No description provided.