summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/google.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-02-25 10:12:31 +0100
committerLukas Reschke <lukas@owncloud.com>2016-02-25 10:12:31 +0100
commitaebb900cd45a38ba9e7f6dfd6217e83e260dc40f (patch)
treee1258a5f5a5ea028d5464aee735bdf0f3a924765 /apps/files_external/lib/google.php
parent3b5ddb417c9811a6a57e2af0f379e088e71e84a4 (diff)
downloadnextcloud-server-aebb900cd45a38ba9e7f6dfd6217e83e260dc40f.tar.gz
nextcloud-server-aebb900cd45a38ba9e7f6dfd6217e83e260dc40f.zip
More error handling
Diffstat (limited to 'apps/files_external/lib/google.php')
-rw-r--r--apps/files_external/lib/google.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 982fa6bb48f..3e8b60d33df 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -446,8 +446,12 @@ class Google extends \OC\Files\Storage\Common {
'save_to' => $tmpFile,
]);
} catch (RequestException $e) {
- if ($e->getResponse()->getStatusCode() === 404) {
- return false;
+ if(!is_null($e->getResponse())) {
+ if ($e->getResponse()->getStatusCode() === 404) {
+ return false;
+ } else {
+ throw $e;
+ }
} else {
throw $e;
}