- Add client api call error format

This commit is contained in:
Vincent BRIDIER 2020-12-03 08:08:08 +01:00
parent 87ab7fd6a3
commit 59cd0b1781

View file

@ -107,7 +107,8 @@ class ApiV1
));
$result = curl_exec($curl);
if(!$result){die("Connection Failure");}
if(!$result)
return ['status' => 'KO', 'code' => 500, 'message' => 'Connection to API failed'];
curl_close($curl);
return json_decode($result);
}