2022-04-05 22:34:06 +03:00
|
|
|
export const errors = {
|
2023-02-22 01:06:43 +02:00
|
|
|
BAD_REQUEST: { code: 6000, message: "Bad request, see 'detail' field for more information" },
|
|
|
|
RPC_VALIDATION_ERROR: { code: 6001, message: "RPC validation error, see 'errors' field for more information" },
|
2022-04-05 22:34:06 +03:00
|
|
|
BAD_LOGIN_CREDENTIALS: { code: 6002, message: "Bad login credentials provided" },
|
|
|
|
BAD_AUTH: { code: 6003, message: "Bad authentication" },
|
2022-04-06 18:50:36 +03:00
|
|
|
NOT_FOUND: { code: 6004, message: "Not found" },
|
|
|
|
FORBIDDEN_DUE_TO_MISSING_PERMISSIONS: { code: 6005, message: "Forbidden due to missing permission(s)" },
|
2022-08-31 17:12:50 +03:00
|
|
|
BAD_REQUEST_KEY: { code: 6006, message: "Bad request key" },
|
2022-04-30 17:17:17 +03:00
|
|
|
GOT_NO_DATABASE_DATA: { code: 7001, message: "Unexpectedly got no data from database" },
|
2022-08-05 04:32:10 +03:00
|
|
|
FEATURE_DISABLED: { code: 7002, message: "This feature is disabled" },
|
2023-02-21 23:52:23 +02:00
|
|
|
INTERNAL_ERROR: { code: 7003, message: "Internal server error" },
|
2022-04-05 22:34:06 +03:00
|
|
|
};
|
2022-04-10 01:22:07 +03:00
|
|
|
|
|
|
|
export const gatewayErrors = {
|
|
|
|
BAD_PAYLOAD: { code: 4001, message: "Bad payload" },
|
|
|
|
BAD_AUTH: { code: 4002, message: "Bad authentication" },
|
|
|
|
AUTHENTICATION_TIMEOUT: { code: 4003, message: "Authentication timeout" },
|
|
|
|
NO_PING: { code: 4004, message: "No ping" },
|
2022-04-14 17:17:54 +03:00
|
|
|
FLOODING: { code: 4005, message: "Flooding (exceeded maximum messages per batch)" },
|
2022-04-14 21:10:05 +03:00
|
|
|
ALREADY_AUTHENTICATED: { code: 4006, message: "Already authenticated" },
|
2022-04-14 21:29:46 +03:00
|
|
|
PAYLOAD_TOO_LARGE: { code: 4007, message: "Payload too large" },
|
2022-04-14 21:52:42 +03:00
|
|
|
TOO_MANY_SESSIONS: { code: 4008, message: "Too many sessions" },
|
2022-05-08 21:56:25 +03:00
|
|
|
NOT_AUTHENTICATED: { code: 4009, message: "Not authenticated" },
|
2022-08-05 05:18:55 +03:00
|
|
|
GOT_NO_DATABASE_DATA: { code: 4010, message: "Unexpectedly got no data from database" },
|
2023-02-21 23:52:23 +02:00
|
|
|
INTERNAL_ERROR: { code: 4011, message: "Internal server error" },
|
2022-04-10 01:22:07 +03:00
|
|
|
};
|