diff --git a/app/config/errors.php b/app/config/errors.php index 1699157d8c..866a29cf80 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -592,6 +592,11 @@ return [ 'description' => 'The attribute type is invalid.', 'code' => 400, ], + Exception::RELATIONSHIP_VALUE_INVALID => [ + 'name' => Exception::RELATIONSHIP_VALUE_INVALID, + 'description' => 'The relationship value is invalid.', + 'code' => 400, + ], /** Indexes */ Exception::INDEX_NOT_FOUND => [ diff --git a/app/controllers/general.php b/app/controllers/general.php index 1828f0676e..60aa1ca5f4 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -849,7 +849,7 @@ App::error() break; case 'Utopia\Database\Exception\InvalidRelationshipValue': \var_dump('Wrapping relationship exception'); - $error = new AppwriteException(AppwriteException::INVALID_RELATIONSHIP_VALUE); + $error = new AppwriteException(AppwriteException::RELATIONSHIP_VALUE_INVALID); break; } diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 4ef4604164..ccc81a471e 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -177,7 +177,7 @@ class Exception extends \Exception public const ATTRIBUTE_TYPE_INVALID = 'attribute_type_invalid'; /** Relationship */ - public const INVALID_RELATIONSHIP_VALUE = 'invalid_relationship_value'; + public const RELATIONSHIP_VALUE_INVALID = 'relationship_value_invalid'; /** Indexes */ public const INDEX_NOT_FOUND = 'index_not_found';