On 7.0.5, curl function is not return proper error as before, for example:
cbq> select curl('https://api.themoviedb.org/3/movie/550');
|
{
|
"requestID": "92a49ca0-f53c-41fe-96ca-205fc7818917",
|
"signature": {
|
"$1": "object"
|
},
|
"results": [
|
],
|
"errors": [
|
{
|
"code": 5010,
|
"msg": "Error evaluating projection. - cause: curl: SSL peer certificate or SSH remote key was not OK"
|
}
|
],
|
"status": "errors",
|
|
or with prepared:
cbq> execute curl_query;
|
{
|
"requestID": "a42059a6-1bd7-4832-86aa-0d3c46f91e0e",
|
"signature": "{\"$1\":\"object\"}",
|
"results": [
|
],
|
"errors": [
|
{
|
"code": 5010,
|
"msg": "Error evaluating projection. - cause: curl: SSL peer certificate or SSH remote key was not OK"
|
}
|
],
|
"status": "errors",
|
On 7.0.4, we return error information
cbq> select curl('https://api.themoviedb.org/3/movie/550');{
|
"requestID": "dd78a9eb-916c-481e-bbe6-810b8cbee909",
|
"signature": {
|
"$1": "object"
|
},
|
"results": [
|
{
|
"$1": {
|
"status_code": 7,
|
"status_message": "Invalid API key: You must be granted a valid key.",
|
"success": false
|
}
|
}
|
],
|
"status": "success",
|
"metrics": {
|
"elapsedTime": "139.383489ms",
|
"executionTime": "139.206688ms",
|
"resultCount": 1,
|
"resultSize": 175,
|
"serviceLoad": 6
|
}
|
}
|
cbq> PREPARE curl_query FROM select curl('https://maps.googleapis.com/maps/api/geocode/json', {'get':True,'data': 'address=santa+cruz&components=country:ES&key=AIzaSyCT6niGCMsgegJkQSYSqpoLZ4_rSO59XQQ'}) ;
|
|
cbq> execute curl_query;
|
{
|
"requestID": "2ee3075f-b31d-4929-baac-8ba64d0a4059",
|
"signature": {
|
"$1": "object"
|
},
|
"results": [
|
{
|
"$1": {
|
"error_message": "The provided API key is invalid. ",
|
"results": [],
|
"status": "REQUEST_DENIED"
|
}
|
}
|
],
|
"status": "success",
|
"metrics": {
|
"elapsedTime": "675.98606ms",
|
"executionTime": "675.811935ms",
|
"resultCount": 1,
|
"resultSize": 165,
|
"serviceLoad": 6
|
}
|
}
|
|