Skip to content

Instantly share code, notes, and snippets.

@jlinxwiler
Created July 5, 2015 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlinxwiler/248cc1fbe0d7f9749561 to your computer and use it in GitHub Desktop.
Save jlinxwiler/248cc1fbe0d7f9749561 to your computer and use it in GitHub Desktop.
Internal Codes - First Draft
Internal Error Code Descriptions:
// --------------------- //
// AUTHENTICATION ERRORS //
// --------------------- //
1 - A low token is required for access to this endpoint. No userId was present in the jwt.
2 - A high token is required for access to this endpoint. No userId was present in the jwt.
3 - An admin token is required for access to this endpoint. No userId was present in the jwt.
10 - The password entered does not match the user's password saved in the database.
11 - The pin entered does not match the device's pin saved in the database.
12 - The SMS code entered does not match a valid code for the phone saved in the database.
20 - Activation code for email is invalid.
40 - User cancelled Facebook authentication flow.
44 - Invalid token secret used in Twitter authentication.
47 - Invalid token received from Google during authentication.
48 - Error saving state token during Google+ authentication.
// ----------------- //
// UNIQUENESS ERRORS //
// ----------------- //
50 - The email address could not be created because the email has already been locked.
51 - The phone number could not be created because the number has already been locked.
52 - The device could not be created because the device ID has already been locked.
// ----------------- //
// COLLECTION ERRORS //
// ----------------- //
101 - One or both of the IDs used to create a relationship did not exist in their respective collections. If known, the missing ID will be returned in the error message.
110 - A user could not be found by ID in the database.
111 - A query for users did not return any results.
112 - A user could not be found by the device ID given.
120 - A device could not be found by ID in the database.
130 - A category could not be found by ID in the database.
131 - A query for categories did not return any results.
140 - A merchant could not be found by ID in the database.
151 - A query for merchants did not return any results.
150 - A region could not be found by ID in the database.
151 - A query for regions did not return any results.
// ---------- //
// STRIPE API //
// ---------- //
210 - An unknown error was returned from the Stripe API.
211 - A card error was returned from the Stripe API. This is most likely due to a card being declined (e.g., the card expiration year is invalid).
212 - An invalid request was passed to the Stripe API. One or more parameters were invalid. If available, more information will be appended to the error message.
213 - An internal error occurred inside of the Stripe API. This is most likely a temporary problem but should be investigated.
214 - A connection error prevented contact with the Stripe API. Most likely caused by some kind of error during HTTPS communication.
215 - An authentication error was returned from the Stripe API. An API call was most likely made with an invalid API key. Check the Stripe configs.
// ---------- //
// PAYPAL API //
// ---------- //
220 - An unknown error was returned from the PayPal API.
221 - A validation error was returned from the PayPal API.
222 - A malformed request error was returned from the PayPal API.
223 - An invalid address error was returned from the PayPal API.
224 - A payment approval expiration error was returned from the PayPal API.
225 - An invalid payment state error was returned from the PayPal API.
226 - An invalid resource ID error was returned from the PayPal API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment