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

Log error when request body is null. #215

Open
benmss opened this issue Jul 19, 2019 · 1 comment
Open

Log error when request body is null. #215

benmss opened this issue Jul 19, 2019 · 1 comment

Comments

@benmss
Copy link

benmss commented Jul 19, 2019

Hi,

The function returned by the logger function is throwing an error when trying to deal with a request object with a null body, due to trying to call Object.keys() on a null value.
At lines 307:320 (v3.2.1):
... Object.keys(req.body) ...

Could the check at line 307: if ( req.body !== undefined ) { be adjusted to also check for a null body?

@yinzara
Copy link
Collaborator

yinzara commented Mar 1, 2020

I believe this was fixed with 4.0.0. Can you verify?

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

No branches or pull requests

2 participants