feat(error-handling): add network error differentiation, retry, and REST API detection (C.5)
WordPress client improvements: - Add ConnectionError exception for network-level failures - Differentiate DNS, SSL, timeout, and connection refused errors - Add retry with exponential backoff for transient errors (502, 503, 504, 429) - Auth/config errors are never retried - Add request timeout (30s default) Health check improvements: - Detect REST API disabled (403/404 on /wp-json) - Classify errors by type: dns_failure, ssl_error, timeout, connection_refused Bare except cleanup: - Replaced all bare except: with except Exception: across 12 files Tests: 303 passed (13 new tests for error handling) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -112,7 +112,7 @@ async def get_instance_info(client: N8nClient) -> str:
|
||||
try:
|
||||
health = await client.health_check()
|
||||
info["health"] = health
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Get current user to verify connectivity
|
||||
@@ -123,7 +123,7 @@ async def get_instance_info(client: N8nClient) -> str:
|
||||
"email": user.get("email"),
|
||||
"role": user.get("role"),
|
||||
}
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
info["instance_url"] = client.site_url
|
||||
|
||||
Reference in New Issue
Block a user