Hello there,
is there a way to try/catch exceptions like "404 Not Found" when querying the API?
OpenStack\Common\Error\BadResponseError: HTTP Error
~~~~~~~~~~
The remote server returned a "404 Not Found" error for the following transaction:
[...]
While instancing OpenStack object I have tried to pass argument:
'requestOptions' => [ 'http_errors' => false ],
but doesn't work. Either with a try/catch:
try {
$server = $compute->getServer(['id' => $this->openstack_id ]);
$server->retrieve();
}
catch( ClientErrorResponseException $e ) {
[...]
}
Thank you!
Hello there,
is there a way to try/catch exceptions like "404 Not Found" when querying the API?
While instancing OpenStack object I have tried to pass argument:
'requestOptions' => [ 'http_errors' => false ],but doesn't work. Either with a try/catch:
Thank you!