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

Error in "body" stringification #59

Closed
ignaciocavina opened this issue Dec 31, 2018 · 3 comments
Closed

Error in "body" stringification #59

ignaciocavina opened this issue Dec 31, 2018 · 3 comments
Assignees
Labels

Comments

@ignaciocavina
Copy link
Contributor

Hi!
I found an error in swsProcessor.prototype.collectRequestResponseData.
It was causing some API calls not to be logged, so I think it should be considered as important.
The problem resides on response bodies containing objects within a main object, otherwise it works well... arrays, etc... works fine.
I could fix it by adding this:

rrr.http.request.body = Object.assign({}, req.body);
swsUtil.swsStringRecursive(rrr.http.request.body, req.body);

I just added the Object.assign - beacuse the problem was within swsStringRecursive - it was lacking the first level of data.

Maybe it is not the best solution, I can send a PR if needed.

Thanks in advance,
Ignacio

@sv2 sv2 added the bug label Jan 8, 2019
@sv2
Copy link
Collaborator

sv2 commented Jan 8, 2019

Thank you, would appreciate PR!

@ignaciocavina
Copy link
Contributor Author

Thanks for merging this! Do you think this could be released (to npm) any time soon?

@sv2
Copy link
Collaborator

sv2 commented Jan 17, 2019

Done :) Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants