SimpleCloudNotifier/scnserver/api/apierr/enums.go

65 lines
1.9 KiB
Go
Raw Normal View History

2022-11-13 19:17:07 +01:00
package apierr
2023-04-21 21:45:16 +02:00
type APIError int //@enum:type
2022-11-13 19:17:07 +01:00
2022-11-18 23:12:37 +01:00
//goland:noinspection GoSnakeCaseUsage
2022-11-13 19:17:07 +01:00
const (
2022-11-20 17:19:11 +01:00
UNDEFINED APIError = -1
2022-11-13 19:17:07 +01:00
NO_ERROR APIError = 0000
MISSING_UID APIError = 1101
MISSING_TOK APIError = 1102
MISSING_TITLE APIError = 1103
INVALID_PRIO APIError = 1104
REQ_METHOD APIError = 1105
INVALID_CLIENTTYPE APIError = 1106
PAGETOKEN_ERROR APIError = 1121
BINDFAIL_QUERY_PARAM APIError = 1151
BINDFAIL_BODY_PARAM APIError = 1152
BINDFAIL_URI_PARAM APIError = 1153
BINDFAIL_HEADER_PARAM APIError = 1152
INVALID_BODY_PARAM APIError = 1161
INVALID_ENUM_VALUE APIError = 1171
2022-11-13 19:17:07 +01:00
NO_TITLE APIError = 1201
TITLE_TOO_LONG APIError = 1202
CONTENT_TOO_LONG APIError = 1203
USR_MSG_ID_TOO_LONG APIError = 1204
TIMESTAMP_OUT_OF_RANGE APIError = 1205
SENDERNAME_TOO_LONG APIError = 1206
CHANNEL_TOO_LONG APIError = 1207
CHANNEL_DESCRIPTION_TOO_LONG APIError = 1208
CHANNEL_NAME_EMPTY APIError = 1209
2022-11-13 19:17:07 +01:00
USER_NOT_FOUND APIError = 1301
CLIENT_NOT_FOUND APIError = 1302
CHANNEL_NOT_FOUND APIError = 1303
SUBSCRIPTION_NOT_FOUND APIError = 1304
MESSAGE_NOT_FOUND APIError = 1305
SUBSCRIPTION_USER_MISMATCH APIError = 1306
2023-04-21 21:45:16 +02:00
KEY_NOT_FOUND APIError = 1307
USER_AUTH_FAILED APIError = 1311
2022-11-13 19:17:07 +01:00
NO_DEVICE_LINKED APIError = 1401
2022-12-14 14:27:41 +01:00
CHANNEL_ALREADY_EXISTS APIError = 1501
2023-04-21 21:45:16 +02:00
CANNOT_SELFDELETE_KEY APIError = 1511
CANNOT_SELFUPDATE_KEY APIError = 1512
2022-12-14 14:27:41 +01:00
2022-11-13 19:17:07 +01:00
QUOTA_REACHED APIError = 2101
2022-11-18 21:25:40 +01:00
FAILED_VERIFY_PRO_TOKEN APIError = 3001
INVALID_PRO_TOKEN APIError = 3002
2022-11-18 23:12:37 +01:00
COMMIT_FAILED = 9001
DATABASE_ERROR = 9002
PERM_QUERY_FAIL = 9003
2022-11-18 21:25:40 +01:00
2022-11-13 19:17:07 +01:00
FIREBASE_COM_FAILED APIError = 9901
FIREBASE_COM_ERRORED APIError = 9902
INTERNAL_EXCEPTION APIError = 9903
2022-12-28 00:32:15 +01:00
PANIC APIError = 9904
NOT_IMPLEMENTED APIError = 9905
2022-11-13 19:17:07 +01:00
)