Skip to content
Snippets Groups Projects
Commit 911d3a7f authored by Rodrigo Goncalves's avatar Rodrigo Goncalves
Browse files

Identification and treatment of invalid/missing certificate

parent 6e175c1e
No related branches found
No related tags found
4 merge requests!25Resolve "CI/CD for SmartDataContext",!24Resolve "Fixes and optimizations for SmartDataContext",!23Resolve "SI Units for Ingress data from TikiWiki",!22Resolve "Unstructured SmartDataContext storage"
This commit is part of merge request !20. Comments created here will be created in the context of that merge request.
......@@ -42,10 +42,13 @@ class SmartDataContextApiClient
$response = curl_exec($ch);
$error = curl_error($ch);
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($error) {
return ['errors' => [$error]];
} else if ($http_status == 401) {
return ['errors' => ["Unauthorized (invalid certificate)."]];
}
return json_decode($response, true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment