1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/common/entities/Error.ts
2018-05-12 12:19:51 -04:00

27 lines
458 B
TypeScript

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