HKUDS/DeepTutor · error · HubError
{self.name}: publish request failed: {exc}
Error message
{self.name}: publish request failed: {exc} What it means
Raised by ClawHubProvider.publish when the multipart POST to the hub's publish/upload endpoint fails at the transport level (httpx.HTTPError: connection refused, DNS failure, TLS error, timeout). No HTTP response was received.
Source
Thrown at deeptutor/services/skill/hub.py:474
zip_bytes: bytes,
token: str,
fields: dict[str, str],
) -> dict[str, Any]:
"""Publish a version via ``POST /skills`` (multipart + bearer token).
Read-only ClawHub mirrors will reject this; eduhub (same /api/v1 shape)
accepts it. Surfaces the API's JSON ``error`` message on failure.
"""
url = f"{self._base_url}/skills"
try:
response = self._client.post(
url,
data={"slug": slug, "version": version, **fields},
files={"zip": ("package.zip", zip_bytes, "application/zip")},
headers={"Authorization": f"Bearer {token}"},
)
except httpx.HTTPError as exc:
raise HubError(f"{self.name}: publish request failed: {exc}") from exc
if response.status_code >= 400:
detail = ""
try:
detail = str(response.json().get("error") or "")
except ValueError:
detail = response.text[:200]
raise HubError(f"{self.name}: publish failed (HTTP {response.status_code}): {detail}")
try:
return response.json()
except ValueError:
return {}
def list_my_skills(self, token: str) -> list[dict[str, Any]]:
"""List the authenticated user's skills via ``GET /skills?owner=me``.
Each row carries the slug, current ``version`` (latest), the full
``versions`` list (for rollback) and the current classification (for
pre-filling an upgrade's tagging) — see ``buildMySkills`` on the hub.View on GitHub (pinned to 3e82f13042)
Solutions
- Verify connectivity: curl -v $BASE_URL (check DNS/TLS/proxy)
- Increase the httpx client timeout for large skill zips
- Fix base_url in settings/skill_hubs.json
- Configure proxy env vars (HTTPS_PROXY) if behind a corporate proxy
Defensive patterns
Strategy: retry
Validate before calling
resp = httpx.get(BASE.replace('/api',''), timeout=5)
if resp.status_code >= 500: defer_publish() Try / catch
for attempt in range(3):
try:
return hub.publish(...)
except HubError as e:
if "publish request failed" in str(e) and attempt < 2:
time.sleep(2 ** attempt); continue
raise Prevention
- Set adequate httpx timeouts for zip uploads
- Check connectivity before long publish flows
When it happens
Trigger: Calling publish(slug, version, token, ...) (via publish_to_hub / `skill publish`) while the hub host is unreachable, DNS fails, the TLS cert is invalid, or the upload of the large zip times out.
Common situations: Wrong base_url; corporate proxy blocking the POST; self-signed cert on a self-hosted hub; slow upload of a big skill zip exceeding the client timeout; offline environment.
Related errors
- Image generation request error: {exc}
- Image generation request error: {exc}
- {self.name}: catalog returned invalid JSON
- {self.name}: publish failed (HTTP {response.status_code}): {
- TTS request error: {exc}
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/aef17ed161cab62e.
Report an issue: GitHub.