1
0
Fork 0
mirror of synced 2024-09-30 09:18:14 +13:00

feat: fix throw

This commit is contained in:
Christy Jacob 2022-03-01 21:19:51 +04:00
parent 5958bdd2dc
commit 4d015cb6f5

View file

@ -999,7 +999,6 @@ App::get('/v1/functions/:functionId/executions')
$function = Authorization::skip(fn() => $dbForProject->getDocument('functions', $functionId)); $function = Authorization::skip(fn() => $dbForProject->getDocument('functions', $functionId));
throw new Exception('Function not found', 404, Exception::FUNCTION_NOT_FOUND);
if ($function->isEmpty()) { if ($function->isEmpty()) {
throw new Exception('Function not found', 404, Exception::FUNCTION_NOT_FOUND); throw new Exception('Function not found', 404, Exception::FUNCTION_NOT_FOUND);
} }