1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

feat: adjust formatting

This commit is contained in:
Christy Jacob 2022-02-07 01:37:11 +04:00
parent 42e424b70a
commit a5b706f64b
2 changed files with 49 additions and 55 deletions

View file

@ -23,11 +23,6 @@ return [
'description' => 'The current user or API key does not have the required scopes to access the requested resource.', 'description' => 'The current user or API key does not have the required scopes to access the requested resource.',
'code' => 401, 'code' => 401,
], ],
Exception::STORAGE_ERROR => [
'name' => Exception::STORAGE_ERROR,
'description' => 'Storage error',
'code' => 500,
],
Exception::GENERAL_RATE_LIMIT_EXCEEDED => [ Exception::GENERAL_RATE_LIMIT_EXCEEDED => [
'name' => Exception::GENERAL_RATE_LIMIT_EXCEEDED, 'name' => Exception::GENERAL_RATE_LIMIT_EXCEEDED,
'description' => 'Rate limit for the current endpoint has been exceeded. Please try again after some time.', 'description' => 'Rate limit for the current endpoint has been exceeded. Please try again after some time.',

View file

@ -44,58 +44,57 @@ class Exception extends \Exception
const USER_ANONYMOUS_CONSOLE_PROHIBITED = 'user_anonymous_console_prohibited'; const USER_ANONYMOUS_CONSOLE_PROHIBITED = 'user_anonymous_console_prohibited';
/** OAuth **/ /** OAuth **/
const OAUTH_PROVIDER_DISABLED = 'oauth_provider_disabled'; const OAUTH_PROVIDER_DISABLED = 'oauth_provider_disabled';
const OAUTH_PROVIDER_UNSUPPORTED = 'oauth_provider_unsupported'; const OAUTH_PROVIDER_UNSUPPORTED = 'oauth_provider_unsupported';
const OAUTH_INVALID_SUCCESS_URL = 'oauth_invalid_success_url'; const OAUTH_INVALID_SUCCESS_URL = 'oauth_invalid_success_url';
const OAUTH_INVALID_FAILURE_URL = 'oauth_invalid_failure_url'; const OAUTH_INVALID_FAILURE_URL = 'oauth_invalid_failure_url';
const OAUTH_MISSING_USER_ID = 'oauth_missing_user_id'; const OAUTH_MISSING_USER_ID = 'oauth_missing_user_id';
/** Teams */ /** Teams */
const TEAM_NOT_FOUND = 'team_not_found'; const TEAM_NOT_FOUND = 'team_not_found';
const TEAM_INVITE_ALREADY_EXISTS = 'team_invite_already_exists'; const TEAM_INVITE_ALREADY_EXISTS = 'team_invite_already_exists';
const TEAM_INVITE_NOT_FOUND = 'team_invite_not_found'; const TEAM_INVITE_NOT_FOUND = 'team_invite_not_found';
const TEAM_INVALID_SECRET = 'team_invalid_secret'; const TEAM_INVALID_SECRET = 'team_invalid_secret';
const TEAM_MEMBERSHIP_MISMATCH = 'team_membership_mismatch'; const TEAM_MEMBERSHIP_MISMATCH = 'team_membership_mismatch';
const TEAM_INVITE_MISMATCH = 'team_invite_mismatch'; const TEAM_INVITE_MISMATCH = 'team_invite_mismatch';
/** Membership */ /** Membership */
const MEMBERSHIP_NOT_FOUND = 'membership_not_found'; const MEMBERSHIP_NOT_FOUND = 'membership_not_found';
/** Avatars */ /** Avatars */
const AVATAR_SET_NOT_FOUND = 'avatar_set_not_found'; const AVATAR_SET_NOT_FOUND = 'avatar_set_not_found';
const AVATAR_NOT_FOUND = 'avatar_not_found'; const AVATAR_NOT_FOUND = 'avatar_not_found';
const AVATAR_IMAGE_NOT_FOUND = 'avatar_image_not_found'; const AVATAR_IMAGE_NOT_FOUND = 'avatar_image_not_found';
const AVATAR_REMOTE_URL_FAILED = 'avatar_remote_url_failed'; const AVATAR_REMOTE_URL_FAILED = 'avatar_remote_url_failed';
const AVATAR_ICON_NOT_FOUND = 'avatar_icon_not_found'; const AVATAR_ICON_NOT_FOUND = 'avatar_icon_not_found';
/** Storage */ /** Storage */
const STORAGE_ERROR = 'storage_error'; const STORAGE_FILE_NOT_FOUND = 'storage_file_not_found';
const STORAGE_FILE_NOT_FOUND = 'storage_file_not_found'; const STORAGE_DEVICE_NOT_FOUND = 'storage_device_not_found';
const STORAGE_DEVICE_NOT_FOUND = 'storage_device_not_found'; const STORAGE_FILE_EMPTY = 'storage_file_empty';
const STORAGE_FILE_EMPTY = 'storage_file_empty'; const STORAGE_FILE_TYPE_UNSUPPORTED = 'storage_file_type_unsupported';
const STORAGE_FILE_TYPE_UNSUPPORTED = 'storage_file_type_unsupported'; const STORAGE_INVALID_FILE_SIZE = 'storage_invalid_file_size';
const STORAGE_INVALID_FILE_SIZE = 'storage_invalid_file_size'; const STORAGE_INVALID_FILE = 'storage_invalid_file';
const STORAGE_INVALID_FILE = 'storage_invalid_file';
/** Functions */ /** Functions */
const FUNCTION_NOT_FOUND = 'function_not_found'; const FUNCTION_NOT_FOUND = 'function_not_found';
/** Deployments */ /** Deployments */
const DEPLOYMENT_NOT_FOUND = 'deployment_not_found'; const DEPLOYMENT_NOT_FOUND = 'deployment_not_found';
/** Execution */ /** Execution */
const EXECUTION_NOT_FOUND = 'execution_not_found'; const EXECUTION_NOT_FOUND = 'execution_not_found';
/** Collections */ /** Collections */
const COLLECTION_NOT_FOUND = 'collection_not_found'; const COLLECTION_NOT_FOUND = 'collection_not_found';
const COLLECTION_ALREADY_EXISTS = 'collection_already_exists'; const COLLECTION_ALREADY_EXISTS = 'collection_already_exists';
const COLLECTION_LIMIT_EXCEEDED = 'collection_limit_exceeded'; const COLLECTION_LIMIT_EXCEEDED = 'collection_limit_exceeded';
/** Documents */ /** Documents */
const DOCUMENT_NOT_FOUND = 'document_not_found'; const DOCUMENT_NOT_FOUND = 'document_not_found';
const DOCUMENT_INVALID_STRUCTURE = 'document_invalid_structure'; const DOCUMENT_INVALID_STRUCTURE = 'document_invalid_structure';
const DOCUMENT_MISSING_PAYLOAD = 'document_missing_payload'; const DOCUMENT_MISSING_PAYLOAD = 'document_missing_payload';
const DOCUMENT_ALREADY_EXISTS = 'document_already_exists'; const DOCUMENT_ALREADY_EXISTS = 'document_already_exists';
/** Attribute */ /** Attribute */
const ATTRIBUTE_NOT_FOUND = 'attribute_not_found'; const ATTRIBUTE_NOT_FOUND = 'attribute_not_found';
@ -108,26 +107,26 @@ class Exception extends \Exception
const ATTRIBUTE_VALUE_INVALID = 'attribute_value_invalid'; const ATTRIBUTE_VALUE_INVALID = 'attribute_value_invalid';
/** Indexes */ /** Indexes */
const INDEX_NOT_FOUND = 'index_not_found'; const INDEX_NOT_FOUND = 'index_not_found';
const INDEX_LIMIT_EXCEEDED = 'index_limit_exceeded'; const INDEX_LIMIT_EXCEEDED = 'index_limit_exceeded';
const INDEX_ALREADY_EXISTS = 'index_already_exists'; const INDEX_ALREADY_EXISTS = 'index_already_exists';
/** Query limit exceeded */ /** Query limit exceeded */
const QUERY_LIMIT_EXCEEDED = 'query_limit_exceeded'; const QUERY_LIMIT_EXCEEDED = 'query_limit_exceeded';
const QUERY_INVALID = 'query_invalid'; const QUERY_INVALID = 'query_invalid';
/** Projects */ /** Projects */
const PROJECT_NOT_FOUND = 'project_not_found'; const PROJECT_NOT_FOUND = 'project_not_found';
const PROJECT_UNKNOWN = 'project_unknown'; const PROJECT_UNKNOWN = 'project_unknown';
/** Webhooks */ /** Webhooks */
const WEBHOOK_NOT_FOUND = 'webhook_not_found'; const WEBHOOK_NOT_FOUND = 'webhook_not_found';
/** Keys */ /** Keys */
const KEY_NOT_FOUND = 'key_not_found'; const KEY_NOT_FOUND = 'key_not_found';
/** Platform */ /** Platform */
const PLATFORM_NOT_FOUND = 'platform_not_found'; const PLATFORM_NOT_FOUND = 'platform_not_found';
/** Domain */ /** Domain */
const DOMAIN_NOT_FOUND = 'domain_not_found'; const DOMAIN_NOT_FOUND = 'domain_not_found';
@ -136,14 +135,14 @@ class Exception extends \Exception
const DOMAIN_VERIFICATION_FAILED = 'domain_verification_failed'; const DOMAIN_VERIFICATION_FAILED = 'domain_verification_failed';
/** General */ /** General */
const GENERAL_DEFAULT = 'general_default'; const GENERAL_DEFAULT = 'general_default';
const GENERAL_ACCESS_FORBIDDEN = 'general_access_forbidden'; const GENERAL_ACCESS_FORBIDDEN = 'general_access_forbidden';
const GENERAL_UNKNOWN_ORIGIN = 'general_unknown_origin'; const GENERAL_UNKNOWN_ORIGIN = 'general_unknown_origin';
const GENERAL_SERVICE_DISABLED = 'general_service_disabled'; const GENERAL_SERVICE_DISABLED = 'general_service_disabled';
const GENERAL_UNAUTHORIZED_SCOPE = 'general_unauthorized_scope'; const GENERAL_UNAUTHORIZED_SCOPE = 'general_unauthorized_scope';
const GENERAL_RATE_LIMIT_EXCEEDED = 'general_rate_limit_exceeded'; const GENERAL_RATE_LIMIT_EXCEEDED = 'general_rate_limit_exceeded';
const GENERAL_SMTP_DISABLED = 'general_smtp_disabled'; const GENERAL_SMTP_DISABLED = 'general_smtp_disabled';
const GENERAL_SERVER_ERROR = 'general_server_error'; const GENERAL_SERVER_ERROR = 'general_server_error';
private $errorCode = ''; private $errorCode = '';