errs

package
v0.0.0-...-1e20926 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const AccountAlreadyLinked = 208

AccountAlreadyLinked ... Error code indicating that an an account being linked is already linked to another user.

View Source
const AggregateError = 600

AggregateError ... 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.

View Source
const AnonymousSigninDisabled = 252

AnonymousSigninDisabled ... Anonymous users are not supported for this application.

View Source
const AppNameInvalid = 256

AppNameInvalid ... App name is invalid.

View Source
const BadAnonymousID = 251

BadAnonymousID ... Anonymous id is not a valid lowercase UUID.

View Source
const CacheMiss = 120

CacheMiss ... Error code indicating the result was not found in the cache.

View Source
const ChangedImmutableFieldError = 136

ChangedImmutableFieldError ... An immutable field was changed.

View Source
const ClassNotEmpty = 255

ClassNotEmpty ... Class is not empty and cannot be dropped.

View Source
const ClientDisconnected = 4

ClientDisconnected ... Connection failure.

View Source
const ClientPushDisabled = 115

ClientPushDisabled ... Client-initiated push is not enabled.

View Source
const ClientPushWithURI = 115

ClientPushWithURI ... Client-initiated push cannot use the "uri" option.

View Source
const CommandUnavailable = 108

CommandUnavailable ... Error code indicating that the feature you tried to access is only available internally for testing purposes.

View Source
const ConnectionFailed = 100

ConnectionFailed ... Error code indicating the connection to the Parse servers failed.

View Source
const DuplicateValue = 137

DuplicateValue ... Error code indicating that a unique field was given a value that is already taken.

View Source
const EmailMissing = 204

EmailMissing ... Error code indicating that the email is missing, but must be specified.

View Source
const EmailNotFound = 205

EmailNotFound ... Error code indicating that a user with the specified email was not found.

View Source
const EmailTaken = 203

EmailTaken ... Error code indicating that the email has already been taken.

View Source
const ExceededConfigParamsError = 116

ExceededConfigParamsError ... You have reached the limit of 100 config parameters.

View Source
const ExceededQuota = 140

ExceededQuota ... Error code indicating that an application quota was exceeded. Upgrade to resolve.

View Source
const FacebookBadID = 251

FacebookBadID ... A user with a linked Facebook account has an invalid session.

View Source
const FacebookBadToken = 251

FacebookBadToken ... The supplied Facebook session token is expired or invalid.

View Source
const FacebookSigninDisabled = 252

FacebookSigninDisabled ... Authentication by Facebook is not supported for this application.

View Source
const FacebookWrongAppID = 251

FacebookWrongAppID ... Unacceptable Facebook application id.

View Source
const FileDeleteError = 153

FileDeleteError ... File could not be deleted.

View Source
const FileReadError = 601

FileReadError ... Error code indicating the client was unable to read an input file.

View Source
const FileSaveError = 130

FileSaveError ... Error code indicating an error saving a file.

View Source
const FileTooLarge = 129

FileTooLarge ... Error code indicating a file that was too large.

View Source
const FunctionNotFound = 141

FunctionNotFound ... Cloud function not found.

View Source
const HostingError = 158

HostingError ... Hosting error.

View Source
const IncorrectType = 111

IncorrectType ... Error code indicating that a field was set to an inconsistent type.

View Source
const InefficientQueryError = 154

InefficientQueryError ... An inefficient query was rejected by the server.

View Source
const InternalServerError = 1

InternalServerError ... Internal server error.

View Source
const InvalidACL = 123

InvalidACL ... Error code indicating an invalid ACL was provided.

View Source
const InvalidAPIKeyError = 903

InvalidAPIKeyError ... The request is using an invalid API key.

View Source
const InvalidAuthDataError = 253

InvalidAuthDataError ... An invalid authData value was passed.

View Source
const InvalidChannelName = 112

InvalidChannelName ... 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.

View Source
const InvalidChannelsArrayError = 134

InvalidChannelsArrayError ... Invalid channels array value.

View Source
const InvalidClassName = 103

InvalidClassName ... 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.

View Source
const InvalidContentLength = 128

InvalidContentLength ... Error code indicating an invalid content length.

View Source
const InvalidDeviceToken = 114

InvalidDeviceToken ... The provided device token is invalid.

View Source
const InvalidDeviceTypeError = 133

InvalidDeviceTypeError ... Invalid device type.

View Source
const InvalidEmailAddress = 125

InvalidEmailAddress ... Error code indicating that the email address was invalid.

View Source
const InvalidEventName = 160

InvalidEventName ... Error code indicating an invalid event name.

View Source
const InvalidExpirationError = 138

InvalidExpirationError ... Invalid expiration value.

View Source
const InvalidFileName = 122

InvalidFileName ... 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.

View Source
const InvalidGeneralAuthData = 251

InvalidGeneralAuthData ... Invalid auth data value used.

View Source
const InvalidImageData = 150

InvalidImageData ... Error code indicating that invalid image data was provided.

View Source
const InvalidInstallationIDError = 132

InvalidInstallationIDError ... Invalid installation id.

View Source
const InvalidJSON = 107

InvalidJSON ... 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.

View Source
const InvalidKeyName = 105

InvalidKeyName ... 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.

View Source
const InvalidLimitError = 117

InvalidLimitError ... An invalid value was set for the limit.

View Source
const InvalidLinkedSession = 251

InvalidLinkedSession ... Error code indicating that a user with a linked (e.g. Facebook) account has an invalid session.

View Source
const InvalidNestedKey = 121

InvalidNestedKey ... Error code indicating that an invalid key was used in a nested JSONObject.

View Source
const InvalidPointer = 106

InvalidPointer ... Error code indicating a malformed pointer. You should not see this unless you have been mucking about changing internal Parse code.

View Source
const InvalidProductIdentifier = 146

InvalidProductIdentifier ... The product identifier is invalid.

View Source
const InvalidPurchaseReceipt = 144

InvalidPurchaseReceipt ... Product purchase receipt is invalid.

View Source
const InvalidPushTimeError = 152

InvalidPushTimeError ... Error code indicating an invalid push time.

View Source
const InvalidQuery = 102

InvalidQuery ... Error code indicating you tried to query with a datatype that doesn't support it, like exact matching an array or object.

View Source
const InvalidRoleName = 139

InvalidRoleName ... Error code indicating that a role's name is invalid.

View Source
const InvalidServerResponse = 148

InvalidServerResponse ... The Apple server response is not valid.

View Source
const InvalidSessionToken = 209

InvalidSessionToken ... Error code indicating that the current session token is invalid.

View Source
const InvalidSkipError = 118

InvalidSkipError ... An invalid value was set for skip.

View Source
const InvalidSubscriptionType = 113

InvalidSubscriptionType ... Bad subscription type.

View Source
const JobNotFound = 141

JobNotFound ... Background job not found.

View Source
const LinkedIDMissing = 250

LinkedIDMissing ... Error code indicating that a user cannot be linked to an account because that account's id could not be found.

View Source
const LinkingNotSupportedError = 999

LinkingNotSupportedError ... Linking to an external account not supported yet with signup_or_login.

View Source
const MissingAPIKeyError = 902

MissingAPIKeyError ... The request is missing an API key.

View Source
const MissingContentLength = 127

MissingContentLength ... Error code indicating a missing content length.

View Source
const MissingContentType = 126

MissingContentType ... Error code indicating a missing content type.

View Source
const MissingDeviceTypeError = 157

MissingDeviceTypeError ... The device type field is missing. Deprecated.

View Source
const MissingObjectID = 104

MissingObjectID ... Error code indicating an unspecified object id.

View Source
const MissingPushIDError = 156

MissingPushIDError ... A push id is missing. Deprecated.

View Source
const MissingRequiredFieldError = 135

MissingRequiredFieldError ... Required field is missing.

View Source
const MultupleSuccessErrorCalls = 141

MultupleSuccessErrorCalls ... Can't call success/error multiple times.

View Source
const MustCreateUserThroughSignup = 207

MustCreateUserThroughSignup ... Error code indicating that a user can only be created through signup.

View Source
const NotInitialized = 109

NotInitialized ... You must call Parse.initialize before using the Parse library.

View Source
const ObjectNotFound = 101

ObjectNotFound ... Error code indicating the specified object doesn't exist.

View Source
const ObjectTooLarge = 116

ObjectTooLarge ... Error code indicating that the object is too large.

View Source
const OperationForbidden = 119

OperationForbidden ... Error code indicating that the operation isn't allowed for clients.

View Source
const OtherCause = -1

OtherCause ... Error code indicating some error other than those enumerated here.

View Source
const PasswordMissing = 201

PasswordMissing ... Error code indicating that the password is missing or empty.

View Source
const PaymentDisabled = 145

PaymentDisabled ... Payment is disabled on this device.

View Source
const ProductDownloadFilesystemError = 149

ProductDownloadFilesystemError ... The product fails to download due to file system error.

View Source
const ProductNotFoundInAppStore = 147

ProductNotFoundInAppStore ... The product is not found in the App Store.

View Source
const PushMisconfigured = 115

PushMisconfigured ... Error code indicating that push is misconfigured.

View Source
const PushMissingChannels = 115

PushMissingChannels ... Non-query push is missing a 'channels' field.

View Source
const PushMissingData = 115

PushMissingData ... Push is missing a 'data' field.

View Source
const PushQueryOrPayloadTooLarge = 115

PushQueryOrPayloadTooLarge ... Your push query or data payload is too large.

View Source
const PushWhereAndChannels = 115

PushWhereAndChannels ... Can't set channels for a query-targeted push.

View Source
const PushWhereAndType = 115

PushWhereAndType ... Can't set device type for a query-targeted push.

View Source
const ReceiptMissing = 143

ReceiptMissing ... Product purchase receipt is missing.

View Source
const RequestLimitExceeded = 155

RequestLimitExceeded ... Error code indicating that the application has exceeded its request limit.

View Source
const ReservedValue = 139

ReservedValue ... Field value is reserved.

View Source
const RestPushDisabled = 115

RestPushDisabled ... REST-initiated push is not enabled.

View Source
const ScriptFailed = 141

ScriptFailed ... Error code indicating that a Cloud Code script failed.

View Source
const ServiceUnavailable = 2

ServiceUnavailable ... The service is currently unavailable.

View Source
const SessionMissing = 206

SessionMissing ... Error code indicating that a user object without a valid session could not be altered.

View Source
const SuccessErrorNotCalled = 141

SuccessErrorNotCalled ... success/error was not called.

View Source
const TemporaryRejectionError = 159

TemporaryRejectionError ... An application's requests are temporary rejected by the server.

View Source
const Timeout = 124

Timeout ... Error code indicating that the request timed out on the server. Typically this indicates that the request is too expensive to run.

View Source
const TwitterConnectFailure = 251

TwitterConnectFailure ... Twitter credentials could not be verified due to problems accessing the Twitter API.

View Source
const TwitterSigninDisabled = 252

TwitterSigninDisabled ... Authentication by Twitter is not supported for this application.

View Source
const TwitterVerificationFailed = 251

TwitterVerificationFailed ... Twitter credential verification failed.

View Source
const TwitterWrongID = 251

TwitterWrongID ... Submitted Twitter id does not match the id associated with the submitted access token.

View Source
const TwitterWrongScreenName = 251

TwitterWrongScreenName ... Submitted Twitter handle does not match the handle associated with the submitted access token.

View Source
const UnsavedFileError = 151

UnsavedFileError ... Error code indicating an unsaved file.

View Source
const UnsupportedService = 252

UnsupportedService ... Error code indicating that a service being linked (e.g. Facebook or Twitter) is unsupported.

View Source
const UserInvalidLoginParams = 101

UserInvalidLoginParams ... Invalid login parameters.

View Source
const UsernameMissing = 200

UsernameMissing ... Error code indicating that the username is missing or empty.

View Source
const UsernameSigninDisabled = 252

UsernameSigninDisabled ... Authentication by username and password is not supported for this application.

View Source
const UsernameTaken = 202

UsernameTaken ... Error code indicating that the username has already been taken.

View Source
const ValidationError = 142

ValidationError ... Error code indicating that a Cloud Code validation failed.

View Source
const WebhookError = 143

WebhookError ... Webhook error.

View Source
const XDomainRequest = 602

XDomainRequest ... 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.

Variables

This section is empty.

Functions

func E

func E(code int, msg string) error

E 组装 json 格式错误信息: {"code": 105,"error": "invalid field name: bl!ng"}

func ErrorMessageToMap

func ErrorMessageToMap(code int, msg string) types.M

ErrorMessageToMap 把错误转换为 types.M 格式,准备返回给客户端

func ErrorToMap

func ErrorToMap(e error) types.M

ErrorToMap 把 error 转换为 types.M 格式,准备返回给客户端

func GetErrorCode

func GetErrorCode(e error) int

GetErrorCode 获取 error 中的 code

func GetErrorMessage

func GetErrorMessage(e error) string

GetErrorMessage 获取 error 中的 Message

Types

type TomatoError

type TomatoError struct {
	Code    int
	Message string
}

TomatoError ...

func (*TomatoError) Error

func (e *TomatoError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL