Rename exception
This commit is contained in:
parent
f13d70d5be
commit
6fb72db7c4
3 changed files with 5 additions and 5 deletions
|
@ -546,10 +546,10 @@ return [
|
||||||
'description' => 'The project key has expired. Please generate a new key using the Appwrite console.',
|
'description' => 'The project key has expired. Please generate a new key using the Appwrite console.',
|
||||||
'code' => 401,
|
'code' => 401,
|
||||||
],
|
],
|
||||||
Exception::ROUTER_UNKNOWN_HOST => [
|
Exception::ROUTER_HOST_NOT_FOUND => [
|
||||||
'name' => Exception::ROUTER_UNKNOWN_HOST,
|
'name' => Exception::ROUTER_HOST_NOT_FOUND,
|
||||||
'description' => 'Host is not trusted. Add a custom domain to your project first.',
|
'description' => 'Host is not trusted. Add a custom domain to your project first.',
|
||||||
'code' => 400,
|
'code' => 404,
|
||||||
],
|
],
|
||||||
Exception::RULE_RESOURCE_NOT_FOUND => [
|
Exception::RULE_RESOURCE_NOT_FOUND => [
|
||||||
'name' => Exception::RULE_RESOURCE_NOT_FOUND,
|
'name' => Exception::RULE_RESOURCE_NOT_FOUND,
|
||||||
|
|
|
@ -57,7 +57,7 @@ function router(App $utopia, Database $dbForConsole, SwooleRequest $swooleReques
|
||||||
)[0] ?? null;
|
)[0] ?? null;
|
||||||
|
|
||||||
if ($route === null) {
|
if ($route === null) {
|
||||||
throw new AppwriteException(AppwriteException::ROUTER_UNKNOWN_HOST);
|
throw new AppwriteException(AppwriteException::ROUTER_HOST_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
$projectId = $route->getAttribute('projectId');
|
$projectId = $route->getAttribute('projectId');
|
||||||
|
|
|
@ -172,7 +172,7 @@ class Exception extends \Exception
|
||||||
public const WEBHOOK_NOT_FOUND = 'webhook_not_found';
|
public const WEBHOOK_NOT_FOUND = 'webhook_not_found';
|
||||||
|
|
||||||
/** Router */
|
/** Router */
|
||||||
public const ROUTER_UNKNOWN_HOST = 'router_unknown_host';
|
public const ROUTER_HOST_NOT_FOUND = 'router_host_not_found';
|
||||||
|
|
||||||
/** Proxy */
|
/** Proxy */
|
||||||
public const RULE_RESOURCE_NOT_FOUND = 'rule_resource_not_found';
|
public const RULE_RESOURCE_NOT_FOUND = 'rule_resource_not_found';
|
||||||
|
|
Loading…
Reference in a new issue