Throw nicer error message instead 500
This commit is contained in:
parent
2d648ed0eb
commit
414896d8a0
|
@ -65,7 +65,9 @@ $pathId = $linkedItem['file_source'];
|
||||||
$path = $view->getPath($pathId);
|
$path = $view->getPath($pathId);
|
||||||
|
|
||||||
if($path === null) {
|
if($path === null) {
|
||||||
throw new \OCP\Files\NotFoundException();
|
\OC_Response::setStatus(\OC_Response::STATUS_NOT_FOUND);
|
||||||
|
\OC_Log::write('core-preview', 'Could not resolve file for shared item', OC_Log::WARN);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pathInfo = $view->getFileInfo($path);
|
$pathInfo = $view->getFileInfo($path);
|
||||||
|
|
Loading…
Reference in New Issue