Refactor for global error type
This commit is contained in:
1 parent
4bd3112816
commit
cb63e7d538
9 files changed
+48
-37
No files matched your search
@@ -0,0 +1 @@
|
||||
pub mod types;
|
||||
@@ -0,0 +1,21 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub enum ErrorCode {
|
||||
Error,
|
||||
Unauthorized,
|
||||
EmailTaken,
|
||||
UsernameTaken,
|
||||
InvalidLoginCode,
|
||||
InvalidImage,
|
||||
InvalidUsername,
|
||||
InvalidEmail,
|
||||
InvalidToken,
|
||||
UnableToConnectToMail,
|
||||
UnableToSendMail,
|
||||
|
||||
MessageNotFound,
|
||||
RoomNotFound,
|
||||
UserNotFound,
|
||||
MalformedDBResponse,
|
||||
}
|
||||
Reference in new issue
Block a user