Increase webhook request timeout from 10 to 60 seconds (#4653)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Suchintan
2026-02-06 11:10:06 -05:00
committed by GitHub
parent a6af22fa20
commit dca4186659
2 changed files with 4 additions and 4 deletions

View File

@@ -148,7 +148,7 @@ async def test_webhook(
validated_url, validated_url,
content=signed_data.signed_payload, content=signed_data.signed_payload,
headers=signed_data.headers, headers=signed_data.headers,
timeout=httpx.Timeout(10.0), timeout=httpx.Timeout(60.0),
) )
status_code = response.status_code status_code = response.status_code
@@ -160,7 +160,7 @@ async def test_webhook(
response_body = response_text response_body = response_text
except httpx.TimeoutException: except httpx.TimeoutException:
error = "Request timed out after 10 seconds." error = "Request timed out after 60 seconds."
LOG.warning( LOG.warning(
"Test webhook timeout", "Test webhook timeout",
organization_id=current_org.organization_id, organization_id=current_org.organization_id,

View File

@@ -471,7 +471,7 @@ async def _deliver_webhook(
try: try:
async with httpx.AsyncClient() as client: async with httpx.AsyncClient() as client:
response = await client.post(url, content=payload, headers=headers, timeout=httpx.Timeout(10.0)) response = await client.post(url, content=payload, headers=headers, timeout=httpx.Timeout(60.0))
status_code = response.status_code status_code = response.status_code
body_text = response.text or "" body_text = response.text or ""
if len(body_text) > RESPONSE_BODY_TRUNCATION_LIMIT: if len(body_text) > RESPONSE_BODY_TRUNCATION_LIMIT:
@@ -479,7 +479,7 @@ async def _deliver_webhook(
else: else:
response_body = body_text or None response_body = body_text or None
except httpx.TimeoutException: except httpx.TimeoutException:
error = "Request timed out after 10 seconds." error = "Request timed out after 60 seconds."
LOG.warning("Webhook replay timed out", url=url) LOG.warning("Webhook replay timed out", url=url)
except httpx.NetworkError as exc: except httpx.NetworkError as exc:
error = f"Could not reach URL: {exc}" error = f"Could not reach URL: {exc}"