diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-02-25 10:12:31 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-02-25 10:12:31 +0100 |
commit | aebb900cd45a38ba9e7f6dfd6217e83e260dc40f (patch) | |
tree | e1258a5f5a5ea028d5464aee735bdf0f3a924765 /apps/files_external/lib/google.php | |
parent | 3b5ddb417c9811a6a57e2af0f379e088e71e84a4 (diff) | |
download | nextcloud-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.php | 8 |
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; } |