From f2583171901975a9d43152d7ceeb5fa5d814f4f2 Mon Sep 17 00:00:00 2001 From: Wikid82 Date: Sat, 22 Nov 2025 22:02:48 -0500 Subject: [PATCH] fix: improve error handling in proxy host form submission --- frontend/src/components/ProxyHostForm.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/ProxyHostForm.tsx b/frontend/src/components/ProxyHostForm.tsx index 5ad4aa0b..fee8ba10 100644 --- a/frontend/src/components/ProxyHostForm.tsx +++ b/frontend/src/components/ProxyHostForm.tsx @@ -137,8 +137,11 @@ export default function ProxyHostForm({ host, onSubmit, onCancel }: ProxyHostFor try { await onSubmit(formData) - } catch (err) { - setError(err instanceof Error ? err.message : 'Failed to save proxy host') + } catch (err: any) { + console.error("Submit error:", err) + // Extract error message from axios response if available + const message = err.response?.data?.error || err.message || 'Failed to save proxy host' + setError(message) } finally { setLoading(false) }