SimpleCloudNotifier/server/api/apierr/enums.go

44 lines
1.1 KiB
Go
Raw Normal View History

2022-11-13 19:17:07 +01:00
package apierr
type APIError int
2022-11-18 23:12:37 +01:00
//goland:noinspection GoSnakeCaseUsage
2022-11-13 19:17:07 +01:00
const (
NO_ERROR APIError = 0000
2022-11-18 23:12:37 +01:00
MISSING_UID APIError = 1101
MISSING_TOK APIError = 1102
MISSING_TITLE APIError = 1103
INVALID_PRIO APIError = 1104
REQ_METHOD APIError = 1105
INVALID_CLIENTTYPE APIError = 1106
BINDFAIL_QUERY_PARAM APIError = 1151
BINDFAIL_BODY_PARAM APIError = 1152
BINDFAIL_URI_PARAM APIError = 1153
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
USER_NOT_FOUND APIError = 1301
2022-11-19 12:50:41 +01:00
CLIENT_NOT_FOUND APIError = 1302
USER_AUTH_FAILED APIError = 1311
2022-11-13 19:17:07 +01:00
NO_DEVICE_LINKED APIError = 1401
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
)