Skip to content

The open-source app everyone uses to manage agents at work

Improve error handling in CompanySettings for mutation failure messages.

JonCSykes1448b55ca425
diff --git a/ui/src/pages/CompanySettings.tsx b/ui/src/pages/CompanySettings.tsx
index 7dd51da021..8d68fcff94 100644
--- a/ui/src/pages/CompanySettings.tsx
+++ b/ui/src/pages/CompanySettings.tsx
@@ -372,7 +372,9 @@ export function CompanySettings() {
)}
{generalMutation.isError && (
<span className="text-xs text-destructive">
- {generalMutation.error.message}
+ {generalMutation.error instanceof Error
+ ? generalMutation.error.message
+ : "Failed to save"}
</span>
)}
</div>