chore: New errors

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-07-12 23:13:07 +03:00
parent 90cd947e71
commit 8333a6ba9a
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

View file

@ -22,8 +22,15 @@ use crate::ws_errors;
pub type WsResult<T> = Result<T, WsError>;
ws_errors! {
InternalServerError = "Internal server error",
InvalidSignature = "Invalid event signature",
NotTextMessage = "The websocket message must be text message",
InvalidJsonData = "Received invalid json data, the text must be valid json",
UnknownClientEvent = "Unknown client event, the event is not recognized by the server",
RegistredUserEvent = "The event is only for registred users",
UserNotFound = "The user is not registered in the server",
AlreadyOnTheWhitelist = "The user is already on your whitelist",
AlreadySendChatRequest = "You have already sent a chat request to this user",
CannotSendChatRequestToSelf = "You cannot send a chat request to yourself",
CannotAddSelfToWhitelist = "You cannot add yourself to the whitelist",
}