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

Empty string in cookie value 400s #139

Open
joshjung opened this issue Aug 10, 2020 · 1 comment
Open

Empty string in cookie value 400s #139

joshjung opened this issue Aug 10, 2020 · 1 comment

Comments

@joshjung
Copy link

joshjung commented Aug 10, 2020

Just discovered that if you provide an empty string value for a cookie during a POST the server errors and says:

2020-08-10T13:19:43.083Z - warn: [error-logger.js] {"status":400,"statusText":"Bad Request","errors":[{"field":[],"location":"body","messages":["\"value\" must be a string"],"types":["string.base"]},{"field":["cookies}

This error is incredibly vague and also incorrect. For some reason an empty string is being interpreted as undefined and/or null. Took me a while to realize that if value is '' then we need to remove the cookie from the POST.

@JustinShift
Copy link

I also bumped into this same error, however for me it was a miss configured/typo in the JSON. Very miss-leading and time consuming to debug.

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