-
Notifications
You must be signed in to change notification settings - Fork 16
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
queryParameters #499
Comments
✅ v1.4.4 released |
@Josmorsot I think is not resolved. The problem ocurrs when is not include any queryParameters, function will include by default [], the evaluation will be true and this one will include queryParameters: '[]', in case queryParemeters will be false, null or undefined, evaluation will return undefined and this will be included in queryParamseters as queryParameters: undefined . Both cases will return error from API Source: https://github.com/CartoDB/carto-react/blob/master/packages/react-api/src/api/SQL.js:
I think an approach could be:
|
Hi @jantolg, is occurring with request through GET or POST? Can you share an example? |
@Josmorsot is ocurring with POST requests. FYI: I'm using v1.4.5
|
I've just tried with: executeSQL({
query: 'SELECT 1',
credentials,
connection: 'bqconn',
}); CURL => It works fine for me (with v1.4.5 and v1.4.6). Can you try to reproduce with latest version and share a curl or create a repo with an example? |
Fixed in v1.4.7 |
Previous version of C4R:
1.3.0
Actual version of C4R:
1.5.0-alpha.1
executeSQL from @carto/react-api
Error:
Payload:
Seems like in the new version, the queryParameters is required to specify any value to avoid 400 error like this:
I just check inside and i found the posible bug is on the
SQL.js
function createRequest
. (line.58)If i downgrade the versions i don't have this issue.
The text was updated successfully, but these errors were encountered: