Skip to content

Commit

Permalink
Merge pull request #38 from mbs-team/main
Browse files Browse the repository at this point in the history
Handle cURL errors
  • Loading branch information
robotdan authored Oct 30, 2024
2 parents 91866fc + bb7a7c2 commit 43560d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/FusionAuth/RESTClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ public function go()

$result = curl_exec($curl);

if (curl_errno($curl)) {
throw new \Exception(curl_error($curl), curl_errno($curl));
}

$response->status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response->status < 200 || $response->status > 299) {
if ($result) {
Expand Down

0 comments on commit 43560d4

Please sign in to comment.