add request size limit notifications
This commit is contained in:
parent
9c99b112d5
commit
5233b4518f
8 changed files with 26 additions and 8 deletions
|
|
@ -14,7 +14,9 @@
|
|||
"dm.key.too.large": "meowchat key too large :o",
|
||||
"dm.key.not.found": "meowchat key not found :c",
|
||||
"dm.key.updated": "meowchat key updated successfully :3",
|
||||
"body.too.large": "request too large ><",
|
||||
"body.too.large": "Meow is too big! Max meow is {0} MB.",
|
||||
"message.too.long": "Meowssage exceeds maximum allowed size ({0}).",
|
||||
"reaction.too.long": "Re-meow-ction exceeds maximum allowed size ({0}).",
|
||||
"invite.revoked": "invite revoked successfully",
|
||||
"invite.declined": "invite declined successfully",
|
||||
"account.creation.request.expired": "cat creation request expired. try again",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@
|
|||
"dm.key.too.large": "DM key too large",
|
||||
"dm.key.not.found": "DM key not found",
|
||||
"dm.key.updated": "DM key updated successfully",
|
||||
"body.too.large": "Request too large",
|
||||
"body.too.large": "Request too large. Max limit is {0} MB",
|
||||
"message.too.long": "Message exceeds maximum allowed size ({0}).",
|
||||
"reaction.too.long": "Reaction exceeds maximum allowed size ({0}).",
|
||||
"invite.revoked": "Invite revoked successfully",
|
||||
"invite.declined": "Invite declined successfully",
|
||||
"account.creation.request.expired": "Account creation request expired. Try again",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@
|
|||
"dm.key.too.large": "Klucz wiadomości prywatnej jest zbyt duży",
|
||||
"dm.key.not.found": "Nie znaleziono klucza wiadomości prywatnej",
|
||||
"dm.key.updated": "Klucz wiadomości prywatnej został pomyślnie zaktualizowany",
|
||||
"body.too.large": "Treść żądania jest zbyt duża",
|
||||
"body.too.large": "Treść żądania jest zbyt duża. Maksymalny limit to {0} MB",
|
||||
"message.too.long": "Wiadomość przekracza dozwolony rozmiar ({0}).",
|
||||
"reaction.too.long": "Reakcja przekracza dozwolony rozmiar ({0}).",
|
||||
"invite.revoked": "Zaproszenie zostało cofnięte",
|
||||
"invite.declined": "Zaproszenie zostało odrzucone",
|
||||
"account.creation.request.expired": "Żądanie utworzenia konta wygasło. Spróbuj ponownie",
|
||||
|
|
|
|||
|
|
@ -2900,9 +2900,12 @@ async function sendMessage(sendbutton = document.getElementById("chat-sendmessag
|
|||
}
|
||||
|
||||
if (res.status === 413) {
|
||||
throw new Error("error.body.too.large");
|
||||
throw new Error("error:body.too.large");
|
||||
}
|
||||
let text = await res.text();
|
||||
if (text.startsWith("error:")) {
|
||||
throw new Error(text);
|
||||
}
|
||||
let decText;
|
||||
try {
|
||||
decText = await decryptString(text, passwordHash);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@
|
|||
"dm.key.too.large": "meowchat key too large :o",
|
||||
"dm.key.not.found": "meowchat key not found :c",
|
||||
"dm.key.updated": "meowchat key updated successfully :3",
|
||||
"body.too.large": "request too large ><",
|
||||
"body.too.large": "Meow is too big! Max meow is {0} MB.",
|
||||
"message.too.long": "Meowssage exceeds maximum allowed size ({0}).",
|
||||
"reaction.too.long": "Re-meow-ction exceeds maximum allowed size ({0}).",
|
||||
"invite.revoked": "invite revoked successfully",
|
||||
"invite.declined": "invite declined successfully",
|
||||
"account.creation.request.expired": "cat creation request expired. try again",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@
|
|||
"dm.key.too.large": "DM key too large",
|
||||
"dm.key.not.found": "DM key not found",
|
||||
"dm.key.updated": "DM key updated successfully",
|
||||
"body.too.large": "Request too large",
|
||||
"body.too.large": "Request too large. Max limit is {0} MB",
|
||||
"message.too.long": "Message exceeds maximum allowed size ({0}).",
|
||||
"reaction.too.long": "Reaction exceeds maximum allowed size ({0}).",
|
||||
"invite.revoked": "Invite revoked successfully",
|
||||
"invite.declined": "Invite declined successfully",
|
||||
"account.creation.request.expired": "Account creation request expired. Try again",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@
|
|||
"dm.key.too.large": "Klucz wiadomości prywatnej jest zbyt duży",
|
||||
"dm.key.not.found": "Nie znaleziono klucza wiadomości prywatnej",
|
||||
"dm.key.updated": "Klucz wiadomości prywatnej został pomyślnie zaktualizowany",
|
||||
"body.too.large": "Treść żądania jest zbyt duża",
|
||||
"body.too.large": "Treść żądania jest zbyt duża. Maksymalny limit to {0} MB",
|
||||
"message.too.long": "Wiadomość przekracza dozwolony rozmiar ({0}).",
|
||||
"reaction.too.long": "Reakcja przekracza dozwolony rozmiar ({0}).",
|
||||
"invite.revoked": "Zaproszenie zostało cofnięte",
|
||||
"invite.declined": "Zaproszenie zostało odrzucone",
|
||||
"account.creation.request.expired": "Żądanie utworzenia konta wygasło. Spróbuj ponownie",
|
||||
|
|
|
|||
|
|
@ -2900,9 +2900,12 @@ async function sendMessage(sendbutton = document.getElementById("chat-sendmessag
|
|||
}
|
||||
|
||||
if (res.status === 413) {
|
||||
throw new Error("error.body.too.large");
|
||||
throw new Error("error:body.too.large");
|
||||
}
|
||||
let text = await res.text();
|
||||
if (text.startsWith("error:")) {
|
||||
throw new Error(text);
|
||||
}
|
||||
let decText;
|
||||
try {
|
||||
decText = await decryptString(text, passwordHash);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue