22 lines
1.5 KiB
C#
22 lines
1.5 KiB
C#
using Knot.Shared.Kernel;
|
|
|
|
namespace Knot.Modules.Chats.Domain;
|
|
|
|
public static class ChatErrors
|
|
{
|
|
public static readonly Error FileEmpty = new Error("File.Empty", "No file uploaded");
|
|
public static readonly Error FileInvalidExtension = new Error("File.InvalidExtension", "Must be a ZIP archive");
|
|
public static readonly Error ImportExpired = new Error("Import.Expired", "Session not found or expired");
|
|
public static readonly Error ImportMissing = new Error("Import.Missing", "ZIP file lost");
|
|
public static readonly Error ChatNotFound = new Error("Chat.NotFound", "Chat not found or access denied");
|
|
public static readonly Error NotFound = new Error("Chat.NotFound", "Chat not found"); // Alias
|
|
public static readonly Error NotMember = new Error("Chat.NotMember", "You are not a member of this chat");
|
|
public static readonly Error ChatsForbidden = new Error("Chats.Forbidden", "Вы не являетесь участником этого чата.");
|
|
public static readonly Error MessagesNotFound = new Error("Messages.NotFound", "Message not found.");
|
|
public static readonly Error ChatsNotFound = new Error("Chats.NotFound", "Чат не найден.");
|
|
public static readonly Error Unauthorized = new Error("Chats.Unauthorized", "Access denied");
|
|
|
|
public static Error ImportCreateChatFailed(string msg) => new Error("Import.CreateChatFailed", msg);
|
|
public static Error FileTooLarge(int maxMb) => new Error("File.TooLarge", $"File exceeds the maximum allowed size of {maxMb}MB.");
|
|
}
|