fix: avoid exposing client error details
This commit is contained in:
@@ -189,10 +189,8 @@ async function sendChatMessage(text, options = {}) {
|
||||
await loadToday();
|
||||
activateTab("today-panel");
|
||||
}
|
||||
} catch (error) {
|
||||
const raw = String(error && error.message ? error.message : "").trim();
|
||||
const detail = raw ? `: ${raw}` : "";
|
||||
appendMessage("assistant", `Не могу отправить сообщение${detail}. Попробуйте ещё раз.`);
|
||||
} catch {
|
||||
appendMessage("assistant", "Не могу отправить сообщение. Попробуйте ещё раз.");
|
||||
} finally {
|
||||
sendButton.disabled = false;
|
||||
messageInput.focus();
|
||||
|
||||
Reference in New Issue
Block a user