mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
feat: update descriptions of functions errors
This commit is contained in:
@@ -270,21 +270,21 @@ return [
|
||||
/** Functions */
|
||||
Exception::FUNCTION_NOT_FOUND => [
|
||||
'name' => Exception::FUNCTION_NOT_FOUND,
|
||||
'description' => 'The requested function could not be found.',
|
||||
'description' => 'Function with the requested ID could not be found.',
|
||||
'code' => 404,
|
||||
],
|
||||
|
||||
/** Deployments */
|
||||
Exception::DEPLOYMENT_NOT_FOUND => [
|
||||
'name' => Exception::DEPLOYMENT_NOT_FOUND,
|
||||
'description' => 'The requested deployment could not be found.',
|
||||
'description' => 'Deployment with the requested ID could not be found.',
|
||||
'code' => 404,
|
||||
],
|
||||
|
||||
/** Executions */
|
||||
Exception::EXECUTION_NOT_FOUND => [
|
||||
'name' => Exception::EXECUTION_NOT_FOUND,
|
||||
'description' => 'The requested execution could not be found.',
|
||||
'description' => 'Execution with the requested ID could not be found.',
|
||||
'code' => 404,
|
||||
],
|
||||
|
||||
|
||||
@@ -554,6 +554,7 @@ App::get('/v1/functions/:functionId/tags')
|
||||
$cursorTag = $dbForProject->getDocument('tags', $cursor);
|
||||
|
||||
if ($cursorTag->isEmpty()) {
|
||||
// TODO: Shouldn't this be a 404 error ?
|
||||
throw new Exception("Tag '{$cursor}' for the 'cursor' value not found.", 400, Exception::DEPLOYMENT_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
@@ -807,6 +808,8 @@ App::get('/v1/functions/:functionId/executions')
|
||||
$cursorExecution = $dbForProject->getDocument('executions', $cursor);
|
||||
|
||||
if ($cursorExecution->isEmpty()) {
|
||||
// TODO: Shouldn't this be a 404 error ?
|
||||
// Or do we define a new error type GENERAL_CURSOR_NOT_FOUND for these types ?
|
||||
throw new Exception("Execution '{$cursor}' for the 'cursor' value not found.", 400, Exception::EXECUTION_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user