mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
chore(review): remove http status codes from exceptions
This commit is contained in:
parent
f2ae6e07cb
commit
8324b789c5
1 changed files with 5 additions and 5 deletions
|
|
@ -129,11 +129,11 @@ class Builds extends Action
|
|||
|
||||
$function = $dbForProject->getDocument('functions', $functionId);
|
||||
if ($function->isEmpty()) {
|
||||
throw new \Exception('Function not found', 404);
|
||||
throw new \Exception('Function not found');
|
||||
}
|
||||
|
||||
if ($isResourceBlocked($project, RESOURCE_TYPE_FUNCTIONS, $functionId)) {
|
||||
throw new \Exception('Function blocked', 403);
|
||||
throw new \Exception('Function blocked');
|
||||
}
|
||||
|
||||
$deploymentId = $deployment->getId();
|
||||
|
|
@ -141,11 +141,11 @@ class Builds extends Action
|
|||
|
||||
$deployment = $dbForProject->getDocument('deployments', $deploymentId);
|
||||
if ($deployment->isEmpty()) {
|
||||
throw new \Exception('Deployment not found', 404);
|
||||
throw new \Exception('Deployment not found');
|
||||
}
|
||||
|
||||
if (empty($deployment->getAttribute('entrypoint', ''))) {
|
||||
throw new \Exception('Entrypoint for your Appwrite Function is missing. Please specify it when making deployment or update the entrypoint under your function\'s "Settings" > "Configuration" > "Entrypoint".', 500);
|
||||
throw new \Exception('Entrypoint for your Appwrite Function is missing. Please specify it when making deployment or update the entrypoint under your function\'s "Settings" > "Configuration" > "Entrypoint".');
|
||||
}
|
||||
|
||||
$version = $function->getAttribute('version', 'v2');
|
||||
|
|
@ -577,7 +577,7 @@ class Builds extends Action
|
|||
$build = $dbForProject->getDocument('builds', $build->getId());
|
||||
|
||||
if ($build->isEmpty()) {
|
||||
throw new \Exception('Build not found', 404);
|
||||
throw new \Exception('Build not found');
|
||||
}
|
||||
|
||||
if ($build->getAttribute('status') === 'canceled') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue