2016-03-19 16:58:27 +08:00
|
|
|
export enum ErrorCodes{
|
2017-06-11 04:32:56 +08:00
|
|
|
NOT_AUTHENTICATED = 0,
|
|
|
|
ALREADY_AUTHENTICATED = 1,
|
|
|
|
NOT_AUTHORISED = 2,
|
2017-07-04 01:17:49 +08:00
|
|
|
PERMISSION_DENIED = 3,
|
|
|
|
CREDENTIAL_NOT_FOUND = 4,
|
2016-03-20 00:31:42 +08:00
|
|
|
|
|
|
|
|
2017-07-04 01:17:49 +08:00
|
|
|
USER_CREATION_ERROR = 5,
|
2016-03-20 00:31:42 +08:00
|
|
|
|
|
|
|
|
2017-07-04 01:17:49 +08:00
|
|
|
GENERAL_ERROR = 6,
|
|
|
|
THUMBNAIL_GENERATION_ERROR = 7,
|
|
|
|
SERVER_ERROR = 8,
|
2016-07-07 18:26:36 +08:00
|
|
|
|
2017-07-04 01:17:49 +08:00
|
|
|
USER_MANAGEMENT_DISABLED = 9,
|
|
|
|
|
2017-07-08 18:43:42 +08:00
|
|
|
INPUT_ERROR = 10,
|
2016-05-09 23:04:56 +08:00
|
|
|
|
2017-07-08 18:43:42 +08:00
|
|
|
SETTINGS_ERROR = 11
|
2016-03-19 16:58:27 +08:00
|
|
|
}
|
|
|
|
|
2016-05-09 23:04:56 +08:00
|
|
|
export class Error {
|
2017-06-11 04:32:56 +08:00
|
|
|
constructor(public code: ErrorCodes, public message?: string) {
|
|
|
|
}
|
|
|
|
}
|