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
[0.28.1] options.paramsSerializer as function don't work #6341
Comments
If you want, I can do the PR? |
Just wanted to note this is also affecting me -- this issue combined with issue #6262 means that if for whatever reason I need to pass the paramsSerializer as a function, then I cannot upgrade to any 0.28.x version, which is a problem because I'm trying to fix GHSA-wf5p-g6vw-rhxx. I've opened a PR to fix this (linked above) and would greatly appreciate if I could get a maintainer to take a look! (Sorry Benjamin if this is stepping on your toes, the tests you copied over didn't run and I don't know what the etiquette is for this sort of change). |
Describe the bug
We have a custom serialize method that is passed to axios by
options.paramsSerializer
.It's work fine with [email protected], but from [email protected], it throw the error :
To Reproduce
No response
Code snippet
Expected behavior
The HTTP request is executed (like in 0.28.0).
Axios Version
0.28.1
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
No response
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
The problem come from the commit 111811eadc849c08a3a2074930c50f68afa6eba5.
In axios.js, this check was added :
And
validator.assertOptions
throw the error when the first parameter isn't a object.Moreover, the next line manage the case where
paramsSerializer
is a function :A solution will be to down the check after the below line transform
paramsSerializer
from function to object, so the check will be ok.The text was updated successfully, but these errors were encountered: