1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-01-16 04:54:49 +02:00
pigallery2/common/entities/Error.ts

27 lines
454 B
TypeScript
Raw Normal View History

export enum ErrorCodes{
NOT_AUTHENTICATED = 0,
ALREADY_AUTHENTICATED = 1,
NOT_AUTHORISED = 2,
2017-07-03 19:17:49 +02:00
PERMISSION_DENIED = 3,
CREDENTIAL_NOT_FOUND = 4,
2017-07-03 19:17:49 +02:00
USER_CREATION_ERROR = 5,
2017-07-03 19:17:49 +02:00
GENERAL_ERROR = 6,
THUMBNAIL_GENERATION_ERROR = 7,
SERVER_ERROR = 8,
2016-07-07 12:26:36 +02:00
2017-07-03 19:17:49 +02:00
USER_MANAGEMENT_DISABLED = 9,
2017-07-08 12:43:42 +02:00
INPUT_ERROR = 10,
2016-05-09 17:04:56 +02:00
2017-07-08 12:43:42 +02:00
SETTINGS_ERROR = 11
}
2016-05-09 17:04:56 +02:00
export class Error {
2017-07-09 14:23:50 +02:00
constructor(public code: ErrorCodes, public message?: string, public details?: any) {
}
}