if ($allDrivesList instanceof OdataError) {
// ToDo: understand how this can happen, and what to do about it.
throw new InvalidResponseException(
"listAllDrives returned an OdataError - " . $allDrivesList->getError()
);
If something goes wrong in the underlying calls down the stack and across to the server, then libre-graph-api calls can return an OdataError object, rather than throwing ApiException.
https://github.com/owncloud/ocis-php-sdk/blob/main/src/Ocis.php has some ToDos about calls that might return an
OdataError
object.If something goes wrong in the underlying calls down the stack and across to the server, then libre-graph-api calls can return an
OdataError
object, rather than throwingApiException
.Sort out what to do if this happens at run-time.