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

Prevent situations when request logger tries to stringify a body that is not logged #2555

Closed
AndreyBelym opened this issue Jun 25, 2018 · 4 comments
Assignees
Labels
AREA: server STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: API TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@AndreyBelym
Copy link
Contributor

E. g. when passing { logRequestBody: false, stringifyRequestBody: true} to a logger. We can throw an error in this case or just ignore the stringify options. We also should state this situation in the docs.

@miherlosev
Copy link
Collaborator

We already have a code that handles this case - https://github.com/DevExpress/testcafe/blob/master/src/api/request-hooks/request-logger.js#L31.

Problem is in src/errors/stack-cleaning-hook.js

@miherlosev miherlosev added TYPE: bug The described behavior is considered as wrong (bug). and removed TYPE: enhancement The accepted proposal for future implementation. labels Jun 26, 2018
@AndreyBelym
Copy link
Contributor Author

An additional reason is that RequestHookConfigureAPIError is an instance of TestRunErrorBase. It must use the APIError class as a base class.

@miherlosev miherlosev self-assigned this Jun 27, 2018
@miherlosev miherlosev modified the milestones: Planned, Sprint #13 Jul 5, 2018
@miherlosev
Copy link
Collaborator

I'm working on this

@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: server STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: API TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

3 participants