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

Update index.js #78

Merged
merged 1 commit into from
May 15, 2015
Merged

Update index.js #78

merged 1 commit into from
May 15, 2015

Conversation

mdarveau
Copy link
Contributor

Added check if body is set. Before the fix, I had the following for some requests:

error: TypeError: Object.keys called on non-object
  at Function.keys (native)
  at ServerResponse.res.end (/Users/mdarveau/perso/workspace/maligue/node_modules/express-winston/index.js:231:51)
  at ServerResponse.res.send (/Users/mdarveau/perso/workspace/maligue/node_modules/sails/node_modules/express/lib/response.js:153:8)
  at ServerResponse.res.json (/Users/mdarveau/perso/workspace/maligue/node_modules/sails/node_modules/express/lib/response.js:195:15)

Note that this only triggers if you have something in bodyBlacklist and nothing in bodyWhitelist.

Added check if body is set. Before the fix, I had the following for some requests:
```
error: TypeError: Object.keys called on non-object
  at Function.keys (native)
  at ServerResponse.res.end (/Users/mdarveau/perso/workspace/maligue/node_modules/express-winston/index.js:231:51)
  at ServerResponse.res.send (/Users/mdarveau/perso/workspace/maligue/node_modules/sails/node_modules/express/lib/response.js:153:8)
  at ServerResponse.res.json (/Users/mdarveau/perso/workspace/maligue/node_modules/sails/node_modules/express/lib/response.js:195:15)
```

Note that this only triggers if you have something in `bodyBlacklist` and nothing in `bodyWhitelist`.
@bithavoc
Copy link
Owner

@floatingLomas ^

floatingLomas added a commit that referenced this pull request May 15, 2015
@floatingLomas floatingLomas merged commit 0b28db0 into bithavoc:master May 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants