Commit 109061b8 authored by Francois Gannaz's avatar Francois Gannaz
Browse files

API fetch: log the curl errors

parent 72794fbf
...@@ -230,8 +230,7 @@ class mod_labnbook_session ...@@ -230,8 +230,7 @@ class mod_labnbook_session
$response = curl_exec($curl); $response = curl_exec($curl);
$responseCode = curl_getinfo($curl, CURLINFO_RESPONSE_CODE); $responseCode = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
if ($response === false || $responseCode != 200) { if ($response === false || $responseCode != 200) {
// log the error? error_log("Query $verb/$urlPath to labnbook API failed with http code $responseCode: " . curl_error($curl));
// See curl_error($curl);
curl_close($curl); curl_close($curl);
return $defaultValue; return $defaultValue;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment