Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / shared / lib / errors.ts
blobc8c0b0bec18d401098d571fdcdae3dd99a4376a5
1 export const HTTP_ERROR_CODES = {
2     ABORTED: -1,
3     TIMEOUT: 0,
4     UNPROCESSABLE_ENTITY: 422,
5     UNAUTHORIZED: 401,
6     UNLOCK: 403,
7     TOO_MANY_REQUESTS: 429,
8     BAD_GATEWAY: 502,
9     SERVICE_UNAVAILABLE: 503,
10     GATEWAY_TIMEOUT: 504,
13 export const API_CUSTOM_ERROR_CODES = {
14     APP_VERSION_BAD: 5003,
15     ALREADY_USED: 2001,
16     NOT_EMPTY: 2005,
17     FEATURE_DISABLED: 2032,
18     ALREADY_EXISTS: 2500,
19     NOT_FOUND: 2501,
20     INVALID_ID: 2061,
21     USERNAME_ALREADY_USED: 12106,
22     EMAIL_FORMAT: 2050,
23     INVALID_DOMAIN_NAME: 2059,
24     INVALID_URL: 2052,
25     NOT_ALLOWED: 2011,
26     CARD_DECLINED: 2902,
27     AUTH_SWITCH_TO_SSO: 8100,
28     AUTH_SWITCH_TO_SRP: 8101,
29     HUMAN_VERIFICATION_REQUIRED: 9001,
30     DEVICE_VERIFICATION_REQUIRED: 9002,
31     SCOPE_MISSING_UNEXPECTED: 9100,
32     INBOX_DESKTOP_TRIAL_END: 9200,
33     AUTH_ACCOUNT_DISABLED: 10003,
34     USER_UPDATE_EMAIL_SELF: 12007,
35     TOKEN_INVALID: 12087,
36     KEY_GET_INPUT_INVALID: 33101,
37     KEY_GET_ADDRESS_MISSING: 33102,
38     KEY_GET_DOMAIN_EXTERNAL: 33103,
39     KEY_GET_INVALID_KT: 33104,
40     INCOMING_DEFAULT_UPDATE_NOT_EXIST: 35023,
41     USER_EXISTS_USERNAME_ALREADY_USED: 12106,
42     NO_RESET_METHODS: 2029,
43     JWT_EXPIRED: 8005,
44     JWT_REDIRECT_LOGIN: 8006,
45     PAYMENTS_SUBSCRIPTION_AMOUNT_MISMATCH: 22101,
46     USER_CREATE_TOKEN_INVALID: 12087,
47     USER_RESTRICTED_STATE: 12100,
48     INVALID_LOGIN: 8002,
49     TOO_MANY_CHILDREN: 8003,
50     FREE_SPACE_EXCEEDED: 200_002,
51     CANT_CREATE_MORE_PASS_ALIASES: 300007,
54 export const EVENT_ERRORS = {
55     MAIL: 1,
56     CONTACTS: 2,
57     ALL: 255,