1
0
Fork 0
mirror of synced 2024-07-05 14:40:42 +12:00

Merge pull request #3198 from appwrite/fix-error-wording

Fix: Error wording
This commit is contained in:
Christy Jacob 2022-05-09 13:59:53 +04:00 committed by GitHub
commit e2a55e2ab8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -845,11 +845,11 @@ App::post('/v1/functions/:functionId/executions')
$deployment = Authorization::skip(fn() => $dbForProject->getDocument('deployments', $function->getAttribute('deployment', '')));
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()) {
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 */