Skip to content
Snippets Groups Projects
Commit 414896d8 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Throw nicer error message instead 500

parent 2d648ed0
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,9 @@ $pathId = $linkedItem['file_source'];
$path = $view->getPath($pathId);
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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment