diff --git a/src/interfaces/services/ISError.ts b/src/interfaces/services/ISError.ts new file mode 100644 index 0000000..94cc46e --- /dev/null +++ b/src/interfaces/services/ISError.ts @@ -0,0 +1,25 @@ +/** + * Represents an error object. + * + * @interface ISError + */ +export interface ISError { + error: ErrorType; + message: string; + result?: unknown; +} + +/** + * Represents the types of errors that can occur in the application. + * + * @enum {number} + */ +export enum ErrorType { + 'InvalidData' = 0, + 'DatabaseError' = 1, + 'ServiceError' = 2, + 'NotFound' = 3, + 'PasswordInvalid' = 4, + 'UnAuthorized' = 5, + 'UnexpectedError' = 6 +} \ No newline at end of file