1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-12 11:15:22 +02:00
pigallery2/common/entities/Error.ts
2018-05-28 14:03:12 -04:00

27 lines
459 B
TypeScript

export enum ErrorCodes {
NOT_AUTHENTICATED = 1,
ALREADY_AUTHENTICATED = 2,
NOT_AUTHORISED = 3,
PERMISSION_DENIED = 4,
CREDENTIAL_NOT_FOUND = 5,
USER_CREATION_ERROR = 6,
GENERAL_ERROR = 7,
THUMBNAIL_GENERATION_ERROR = 8,
SERVER_ERROR = 9,
USER_MANAGEMENT_DISABLED = 10,
INPUT_ERROR = 11,
SETTINGS_ERROR = 12
}
export class ErrorDTO {
constructor(public code: ErrorCodes, public message?: string, public details?: any) {
}
}