- Add client api call error format
This commit is contained in:
parent
87ab7fd6a3
commit
59cd0b1781
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue