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