mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Replace console errors with toast errors (#2601)
This commit is contained in:
parent
63a3285b23
commit
868b7460d4
@ -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);
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user