mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 15:19:08 +03:00
feat: improve timeouts for webhooks (#29066)
This commit is contained in:
1 parent
c04d86a5db
commit
8059e2dedb
1 file changed
+3
-3
@@ -92,7 +92,7 @@ const EditHookPanel = ({ visible, selectedHook, onClose }: EditHookPanelProps) =
|
||||
function_type: isEdgeFunction(selectedHook?.function_args?.[0] ?? '')
|
||||
? 'supabase_function'
|
||||
: 'http_request',
|
||||
timeout_ms: Number(selectedHook?.function_args?.[4] ?? 1000),
|
||||
timeout_ms: Number(selectedHook?.function_args?.[4] ?? 5000),
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@@ -165,8 +165,8 @@ const EditHookPanel = ({ visible, selectedHook, onClose }: EditHookPanelProps) =
|
||||
}
|
||||
}
|
||||
|
||||
if (values.timeout_ms < 1000 || values.timeout_ms > 5000) {
|
||||
errors['timeout_ms'] = 'Timeout should be between 1000ms and 5000ms'
|
||||
if (values.timeout_ms < 1000 || values.timeout_ms > 10_000) {
|
||||
errors['timeout_ms'] = 'Timeout should be between 1000ms and 10,000ms'
|
||||
}
|
||||
|
||||
if (JSON.stringify(values) !== JSON.stringify(initialValues)) setIsEdited(true)
|
||||
|
||||
Reference in new issue
Block a user