More error handling
This commit is contained in:
parent
3b5ddb417c
commit
aebb900cd4
|
@ -446,8 +446,12 @@ class Google extends \OC\Files\Storage\Common {
|
||||||
'save_to' => $tmpFile,
|
'save_to' => $tmpFile,
|
||||||
]);
|
]);
|
||||||
} catch (RequestException $e) {
|
} catch (RequestException $e) {
|
||||||
if ($e->getResponse()->getStatusCode() === 404) {
|
if(!is_null($e->getResponse())) {
|
||||||
return false;
|
if ($e->getResponse()->getStatusCode() === 404) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue