owncloud / ocis-php-sdk

Apache License 2.0
3 stars 1 forks source link

Resolve ToDos in ocis.php related to OdataError #200

Closed phil-davis closed 5 months ago

phil-davis commented 5 months ago

https://github.com/owncloud/ocis-php-sdk/blob/main/src/Ocis.php has some ToDos about calls that might return an OdataError object.

        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.

Sort out what to do if this happens at run-time.

individual-it commented 5 months ago

@phil-davis @amrita-shrestha is this done?

phil-davis commented 5 months ago

yes, done in #201