valid json results in not a valid JSON error
See original GitHub issueThe following valid JSON results in an Error running query: Invalid query format. The query is not a valid JSON.
error.
{
"collection": "event",
"aggregate": [
{
"$project": {
"month": {
"$date": "$startDate"
}
}
}
]
}
What gets posted to the http endpoint?
curl 'http://localhost/api/query_results' -H 'Accept: application/json, text/plain, */*' -H 'Cookie: session=.eJwdjjGLg0AQRv_KMXUKXbxGuObYRBRmxDCJzDYhR8yts24TOc4Y8t-zpHp8xft4Dzhdb8Psobyep3nYwGm8QPmAjx8oQVgK0qMndVF4Uuopuqq7k9kF6RttbTOR_R7RutFpXaDu075Ep00Qxsxxl2OkiHzIhevkNSo9FmTJC7v0u4tUyYIqGXFnRMNna_2IKy4SxaChkLigOcaW9wHXOmvtISP1Eatudf32n-zvPflf8NzA3zzc3v2Qw_MFsLVHzw.DG2bqw.U5SBWIiOFT9VhZJjRuLnST96TnY' -H 'Connection: keep-alive' --data-binary '{"data_source_id":1,"query":"{\n \"collection\": \"event\",\n \"aggregate\": [\n {\n \"$project\": {\n \"month\": {\n \"$date\": \"$startDate\"\n }\n }\n }\n ]\n}","max_age":0,"query_id":5}' --compressed
What do the logs say?
worker_1 | [2017-08-10 07:22:38,603: INFO/MainProcess] Task redash.tasks.execute_query[9b0c71ad-d792-40c8-9c85-f749baabdfa8] succeeded in 0.0139267686754s: QueryExecutionError('Invalid query format. The query is not a valid JSON.',)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
6 Fixes for "the response is not a valid JSON response" Error in
1. Reset the permalinks ... Before you try anything else, you should try resetting your permalinks to resolve the invalid JSON response error....
Read more >How to Fix “The Response Is Not a Valid JSON ... - iThemes
Top 5 Issues Behind “The response is not a valid JSON response” Error and How to Address Them · Incorrect WordPress Site Address...
Read more >How to Fix "Updating Failed. The Response is Not a Valid ...
Encountering the "Updating failed. The response is not a valid JSON response." error? In this article, you will learn how to fix it....
Read more >How to Fix the Invalid JSON Error in WordPress? - Rank Math
In this article, learn how to fix the invalid JSON error - 'Updating failed. The response is not a valid JSON response.' with...
Read more >How to Fix the Invalid JSON Response Error in WordPress
How to Fix the WordPress Invalid JSON Response Error · Fix your site's permalinks and . · Check your WordPress site URL. ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SebC99 What is the value of
{{fromDate}}
and{{toDate}}
parameter?My query which is using
"$match"
and"$date"
got a correct result.@SebC99 I’m closing this as the new issue you opened (#2362) is clearer and contains the relevant info. Thanks 👍