fusionauth-php-client icon indicating copy to clipboard operation
fusionauth-php-client copied to clipboard

Timeouts and other cURL errors are not handled

Open glen-84 opened this issue 3 years ago • 1 comments

When there's a read timeout, the response looks something like this:

FusionAuth\ClientResponse::__set_state(array(
   'errorResponse' => NULL,
   'exception' => NULL,
   'method' => 'PATCH',
   'request' => 
  array (
    'user' => 
    array (
        /* ... */
    ),
  ),
   'successResponse' => NULL,
   'status' => 0,
))

i.e. The errorResponse, exception, and successResponse are all NULL.

I think the code needs to use curl_errno to check for errors.

glen-84 avatar Oct 05 '22 13:10 glen-84

Thanks for filing this @glen-84 . We're looking at overhauling our client libraries and will take a look at this.

mooreds avatar Oct 11 '22 23:10 mooreds