Replace console errors with toast errors (#2601)

This commit is contained in:
sp.wack 2024-06-23 10:09:16 +03:00 committed by GitHub
parent 63a3285b23
commit 868b7460d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ function SettingsModal({ isOpen, onOpenChange }: SettingsProps) {
setModels(await fetchModels());
setAgents(await fetchAgents());
} catch (error) {
console.error(error);
toast.error("settings", "Failed to fetch models and agents");
} finally {
setLoading(false);
}

View File

@ -84,7 +84,7 @@ class Session {
Session._history.push(data);
} catch (err) {
// TODO: report the error
console.error("Error parsing JSON data", err);
toast.error("ws", "Error handing message.");
return;
}
if (data.error && data.error_code === 401) {