1
0
Fork 0
mirror of synced 2024-10-03 19:53:33 +13:00

Rename exception

This commit is contained in:
Matej Bačo 2023-07-29 18:03:13 +02:00
parent f13d70d5be
commit 6fb72db7c4
3 changed files with 5 additions and 5 deletions

View file

@ -546,10 +546,10 @@ return [
'description' => 'The project key has expired. Please generate a new key using the Appwrite console.',
'code' => 401,
],
Exception::ROUTER_UNKNOWN_HOST => [
'name' => Exception::ROUTER_UNKNOWN_HOST,
Exception::ROUTER_HOST_NOT_FOUND => [
'name' => Exception::ROUTER_HOST_NOT_FOUND,
'description' => 'Host is not trusted. Add a custom domain to your project first.',
'code' => 400,
'code' => 404,
],
Exception::RULE_RESOURCE_NOT_FOUND => [
'name' => Exception::RULE_RESOURCE_NOT_FOUND,

View file

@ -57,7 +57,7 @@ function router(App $utopia, Database $dbForConsole, SwooleRequest $swooleReques
)[0] ?? null;
if ($route === null) {
throw new AppwriteException(AppwriteException::ROUTER_UNKNOWN_HOST);
throw new AppwriteException(AppwriteException::ROUTER_HOST_NOT_FOUND);
}
$projectId = $route->getAttribute('projectId');

View file

@ -172,7 +172,7 @@ class Exception extends \Exception
public const WEBHOOK_NOT_FOUND = 'webhook_not_found';
/** Router */
public const ROUTER_UNKNOWN_HOST = 'router_unknown_host';
public const ROUTER_HOST_NOT_FOUND = 'router_host_not_found';
/** Proxy */
public const RULE_RESOURCE_NOT_FOUND = 'rule_resource_not_found';