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,
|
'save_to' => $tmpFile,
|
||||||
]);
|
]);
|
||||||
} catch (RequestException $e) {
|
} catch (RequestException $e) {
|
||||||
|
if(!is_null($e->getResponse())) {
|
||||||
if ($e->getResponse()->getStatusCode() === 404) {
|
if ($e->getResponse()->getStatusCode() === 404) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return fopen($tmpFile, 'r');
|
return fopen($tmpFile, 'r');
|
||||||
|
|
Loading…
Reference in New Issue