waffle/src/errors.ts

27 lines
1.6 KiB
TypeScript
Raw Normal View History

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)" },
BAD_REQUEST_KEY: { code: 6006, message: "Bad request key" },
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)" },
ALREADY_AUTHENTICATED: { code: 4006, message: "Already authenticated" },
PAYLOAD_TOO_LARGE: { code: 4007, message: "Payload too large" },
TOO_MANY_SESSIONS: { code: 4008, message: "Too many sessions" },
NOT_AUTHENTICATED: { code: 4009, message: "Not authenticated" },
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
};