Last active
June 2, 2017 14:31
-
-
Save matiasherranz/dd474fed6cdbd352deb28a27f7509878 to your computer and use it in GitHub Desktop.
Full set of error codes for ParseJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Parse JavaScript SDK v1.9.2 | |
* | |
* The source tree of this library can be found at | |
* https://github.com/ParsePlatform/Parse-SDK-JS | |
*/ | |
/** | |
* Copyright (c) 2015-present, Parse, LLC. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
/** | |
* Constructs a new Parse.Error object with the given code and message. | |
* @class Parse.Error | |
* @constructor | |
* @param {Number} code An error code constant from <code>Parse.Error</code>. | |
* @param {String} message A detailed description of the error. | |
*/ | |
var ParseError = function ParseError(code, message) { | |
(0, _classCallCheck3.default)(this, ParseError); | |
this.code = code; | |
this.message = message; | |
}; | |
/** | |
* Error code indicating some error other than those enumerated here. | |
* @property OTHER_CAUSE | |
* @static | |
* @final | |
*/ | |
exports.default = ParseError; | |
ParseError.OTHER_CAUSE = -1; | |
/** | |
* Error code indicating that something has gone wrong with the server. | |
* If you get this error code, it is Parse's fault. Contact us at | |
* https://parse.com/help | |
* @property INTERNAL_SERVER_ERROR | |
* @static | |
* @final | |
*/ | |
ParseError.INTERNAL_SERVER_ERROR = 1; | |
/** | |
* Error code indicating the connection to the Parse servers failed. | |
* @property CONNECTION_FAILED | |
* @static | |
* @final | |
*/ | |
ParseError.CONNECTION_FAILED = 100; | |
/** | |
* Error code indicating the specified object doesn't exist. | |
* @property OBJECT_NOT_FOUND | |
* @static | |
* @final | |
*/ | |
ParseError.OBJECT_NOT_FOUND = 101; | |
/** | |
* Error code indicating you tried to query with a datatype that doesn't | |
* support it, like exact matching an array or object. | |
* @property INVALID_QUERY | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_QUERY = 102; | |
/** | |
* Error code indicating a missing or invalid classname. Classnames are | |
* case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the | |
* only valid characters. | |
* @property INVALID_CLASS_NAME | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_CLASS_NAME = 103; | |
/** | |
* Error code indicating an unspecified object id. | |
* @property MISSING_OBJECT_ID | |
* @static | |
* @final | |
*/ | |
ParseError.MISSING_OBJECT_ID = 104; | |
/** | |
* Error code indicating an invalid key name. Keys are case-sensitive. They | |
* must start with a letter, and a-zA-Z0-9_ are the only valid characters. | |
* @property INVALID_KEY_NAME | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_KEY_NAME = 105; | |
/** | |
* Error code indicating a malformed pointer. You should not see this unless | |
* you have been mucking about changing internal Parse code. | |
* @property INVALID_POINTER | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_POINTER = 106; | |
/** | |
* Error code indicating that badly formed JSON was received upstream. This | |
* either indicates you have done something unusual with modifying how | |
* things encode to JSON, or the network is failing badly. | |
* @property INVALID_JSON | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_JSON = 107; | |
/** | |
* Error code indicating that the feature you tried to access is only | |
* available internally for testing purposes. | |
* @property COMMAND_UNAVAILABLE | |
* @static | |
* @final | |
*/ | |
ParseError.COMMAND_UNAVAILABLE = 108; | |
/** | |
* You must call Parse.initialize before using the Parse library. | |
* @property NOT_INITIALIZED | |
* @static | |
* @final | |
*/ | |
ParseError.NOT_INITIALIZED = 109; | |
/** | |
* Error code indicating that a field was set to an inconsistent type. | |
* @property INCORRECT_TYPE | |
* @static | |
* @final | |
*/ | |
ParseError.INCORRECT_TYPE = 111; | |
/** | |
* Error code indicating an invalid channel name. A channel name is either | |
* an empty string (the broadcast channel) or contains only a-zA-Z0-9_ | |
* characters and starts with a letter. | |
* @property INVALID_CHANNEL_NAME | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_CHANNEL_NAME = 112; | |
/** | |
* Error code indicating that push is misconfigured. | |
* @property PUSH_MISCONFIGURED | |
* @static | |
* @final | |
*/ | |
ParseError.PUSH_MISCONFIGURED = 115; | |
/** | |
* Error code indicating that the object is too large. | |
* @property OBJECT_TOO_LARGE | |
* @static | |
* @final | |
*/ | |
ParseError.OBJECT_TOO_LARGE = 116; | |
/** | |
* Error code indicating that the operation isn't allowed for clients. | |
* @property OPERATION_FORBIDDEN | |
* @static | |
* @final | |
*/ | |
ParseError.OPERATION_FORBIDDEN = 119; | |
/** | |
* Error code indicating the result was not found in the cache. | |
* @property CACHE_MISS | |
* @static | |
* @final | |
*/ | |
ParseError.CACHE_MISS = 120; | |
/** | |
* Error code indicating that an invalid key was used in a nested | |
* JSONObject. | |
* @property INVALID_NESTED_KEY | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_NESTED_KEY = 121; | |
/** | |
* Error code indicating that an invalid filename was used for ParseFile. | |
* A valid file name contains only a-zA-Z0-9_. characters and is between 1 | |
* and 128 characters. | |
* @property INVALID_FILE_NAME | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_FILE_NAME = 122; | |
/** | |
* Error code indicating an invalid ACL was provided. | |
* @property INVALID_ACL | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_ACL = 123; | |
/** | |
* Error code indicating that the request timed out on the server. Typically | |
* this indicates that the request is too expensive to run. | |
* @property TIMEOUT | |
* @static | |
* @final | |
*/ | |
ParseError.TIMEOUT = 124; | |
/** | |
* Error code indicating that the email address was invalid. | |
* @property INVALID_EMAIL_ADDRESS | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_EMAIL_ADDRESS = 125; | |
/** | |
* Error code indicating a missing content type. | |
* @property MISSING_CONTENT_TYPE | |
* @static | |
* @final | |
*/ | |
ParseError.MISSING_CONTENT_TYPE = 126; | |
/** | |
* Error code indicating a missing content length. | |
* @property MISSING_CONTENT_LENGTH | |
* @static | |
* @final | |
*/ | |
ParseError.MISSING_CONTENT_LENGTH = 127; | |
/** | |
* Error code indicating an invalid content length. | |
* @property INVALID_CONTENT_LENGTH | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_CONTENT_LENGTH = 128; | |
/** | |
* Error code indicating a file that was too large. | |
* @property FILE_TOO_LARGE | |
* @static | |
* @final | |
*/ | |
ParseError.FILE_TOO_LARGE = 129; | |
/** | |
* Error code indicating an error saving a file. | |
* @property FILE_SAVE_ERROR | |
* @static | |
* @final | |
*/ | |
ParseError.FILE_SAVE_ERROR = 130; | |
/** | |
* Error code indicating that a unique field was given a value that is | |
* already taken. | |
* @property DUPLICATE_VALUE | |
* @static | |
* @final | |
*/ | |
ParseError.DUPLICATE_VALUE = 137; | |
/** | |
* Error code indicating that a role's name is invalid. | |
* @property INVALID_ROLE_NAME | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_ROLE_NAME = 139; | |
/** | |
* Error code indicating that an application quota was exceeded. Upgrade to | |
* resolve. | |
* @property EXCEEDED_QUOTA | |
* @static | |
* @final | |
*/ | |
ParseError.EXCEEDED_QUOTA = 140; | |
/** | |
* Error code indicating that a Cloud Code script failed. | |
* @property SCRIPT_FAILED | |
* @static | |
* @final | |
*/ | |
ParseError.SCRIPT_FAILED = 141; | |
/** | |
* Error code indicating that a Cloud Code validation failed. | |
* @property VALIDATION_ERROR | |
* @static | |
* @final | |
*/ | |
ParseError.VALIDATION_ERROR = 142; | |
/** | |
* Error code indicating that invalid image data was provided. | |
* @property INVALID_IMAGE_DATA | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_IMAGE_DATA = 143; | |
/** | |
* Error code indicating an unsaved file. | |
* @property UNSAVED_FILE_ERROR | |
* @static | |
* @final | |
*/ | |
ParseError.UNSAVED_FILE_ERROR = 151; | |
/** | |
* Error code indicating an invalid push time. | |
* @property INVALID_PUSH_TIME_ERROR | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_PUSH_TIME_ERROR = 152; | |
/** | |
* Error code indicating an error deleting a file. | |
* @property FILE_DELETE_ERROR | |
* @static | |
* @final | |
*/ | |
ParseError.FILE_DELETE_ERROR = 153; | |
/** | |
* Error code indicating that the application has exceeded its request | |
* limit. | |
* @property REQUEST_LIMIT_EXCEEDED | |
* @static | |
* @final | |
*/ | |
ParseError.REQUEST_LIMIT_EXCEEDED = 155; | |
/** | |
* Error code indicating an invalid event name. | |
* @property INVALID_EVENT_NAME | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_EVENT_NAME = 160; | |
/** | |
* Error code indicating that the username is missing or empty. | |
* @property USERNAME_MISSING | |
* @static | |
* @final | |
*/ | |
ParseError.USERNAME_MISSING = 200; | |
/** | |
* Error code indicating that the password is missing or empty. | |
* @property PASSWORD_MISSING | |
* @static | |
* @final | |
*/ | |
ParseError.PASSWORD_MISSING = 201; | |
/** | |
* Error code indicating that the username has already been taken. | |
* @property USERNAME_TAKEN | |
* @static | |
* @final | |
*/ | |
ParseError.USERNAME_TAKEN = 202; | |
/** | |
* Error code indicating that the email has already been taken. | |
* @property EMAIL_TAKEN | |
* @static | |
* @final | |
*/ | |
ParseError.EMAIL_TAKEN = 203; | |
/** | |
* Error code indicating that the email is missing, but must be specified. | |
* @property EMAIL_MISSING | |
* @static | |
* @final | |
*/ | |
ParseError.EMAIL_MISSING = 204; | |
/** | |
* Error code indicating that a user with the specified email was not found. | |
* @property EMAIL_NOT_FOUND | |
* @static | |
* @final | |
*/ | |
ParseError.EMAIL_NOT_FOUND = 205; | |
/** | |
* Error code indicating that a user object without a valid session could | |
* not be altered. | |
* @property SESSION_MISSING | |
* @static | |
* @final | |
*/ | |
ParseError.SESSION_MISSING = 206; | |
/** | |
* Error code indicating that a user can only be created through signup. | |
* @property MUST_CREATE_USER_THROUGH_SIGNUP | |
* @static | |
* @final | |
*/ | |
ParseError.MUST_CREATE_USER_THROUGH_SIGNUP = 207; | |
/** | |
* Error code indicating that an an account being linked is already linked | |
* to another user. | |
* @property ACCOUNT_ALREADY_LINKED | |
* @static | |
* @final | |
*/ | |
ParseError.ACCOUNT_ALREADY_LINKED = 208; | |
/** | |
* Error code indicating that the current session token is invalid. | |
* @property INVALID_SESSION_TOKEN | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_SESSION_TOKEN = 209; | |
/** | |
* Error code indicating that a user cannot be linked to an account because | |
* that account's id could not be found. | |
* @property LINKED_ID_MISSING | |
* @static | |
* @final | |
*/ | |
ParseError.LINKED_ID_MISSING = 250; | |
/** | |
* Error code indicating that a user with a linked (e.g. Facebook) account | |
* has an invalid session. | |
* @property INVALID_LINKED_SESSION | |
* @static | |
* @final | |
*/ | |
ParseError.INVALID_LINKED_SESSION = 251; | |
/** | |
* Error code indicating that a service being linked (e.g. Facebook or | |
* Twitter) is unsupported. | |
* @property UNSUPPORTED_SERVICE | |
* @static | |
* @final | |
*/ | |
ParseError.UNSUPPORTED_SERVICE = 252; | |
/** | |
* Error code indicating that there were multiple errors. Aggregate errors | |
* have an "errors" property, which is an array of error objects with more | |
* detail about each error that occurred. | |
* @property AGGREGATE_ERROR | |
* @static | |
* @final | |
*/ | |
ParseError.AGGREGATE_ERROR = 600; | |
/** | |
* Error code indicating the client was unable to read an input file. | |
* @property FILE_READ_ERROR | |
* @static | |
* @final | |
*/ | |
ParseError.FILE_READ_ERROR = 601; | |
/** | |
* Error code indicating a real error code is unavailable because | |
* we had to use an XDomainRequest object to allow CORS requests in | |
* Internet Explorer, which strips the body from HTTP responses that have | |
* a non-2XX status code. | |
* @property X_DOMAIN_REQUEST | |
* @static | |
* @final | |
*/ | |
ParseError.X_DOMAIN_REQUEST = 602; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment