Merge pull request #3198 from appwrite/fix-error-wording
Fix: Error wording
This commit is contained in:
commit
e2a55e2ab8
|
@ -845,11 +845,11 @@ App::post('/v1/functions/:functionId/executions')
|
||||||
$deployment = Authorization::skip(fn() => $dbForProject->getDocument('deployments', $function->getAttribute('deployment', '')));
|
$deployment = Authorization::skip(fn() => $dbForProject->getDocument('deployments', $function->getAttribute('deployment', '')));
|
||||||
|
|
||||||
if ($deployment->getAttribute('resourceId') !== $function->getId()) {
|
if ($deployment->getAttribute('resourceId') !== $function->getId()) {
|
||||||
throw new Exception('Deployment not found. Deploy deployment before trying to execute a function', 404, Exception::DEPLOYMENT_NOT_FOUND);
|
throw new Exception('Deployment not found. Create a deployment before trying to execute a function', 404, Exception::DEPLOYMENT_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($deployment->isEmpty()) {
|
if ($deployment->isEmpty()) {
|
||||||
throw new Exception('Deployment not found. Deploy deployment before trying to execute a function', 404, Exception::DEPLOYMENT_NOT_FOUND);
|
throw new Exception('Deployment not found. Create a deployment before trying to execute a function', 404, Exception::DEPLOYMENT_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Check if build has completed */
|
/** Check if build has completed */
|
||||||
|
|
Loading…
Reference in a new issue