{"record":{"id":"867f51c8272fd977","repo":"HKUDS/DeepTutor","slug":"self-name-http-response-status-code-respons","errorCode":null,"errorMessage":"{self.name}: HTTP {response.status_code}: {response.text[:200]}","messagePattern":"(.+?): HTTP (.+?): (.+?)","errorType":"http","errorClass":"HubError","httpStatus":null,"severity":"error","filePath":"deeptutor/services/skill/hub.py","lineNumber":506,"sourceCode":"        \"\"\"List the authenticated user's skills via ``GET /skills?owner=me``.\n\n        Each row carries the slug, current ``version`` (latest), the full\n        ``versions`` list (for rollback) and the current classification (for\n        pre-filling an upgrade's tagging) — see ``buildMySkills`` on the hub.\n        \"\"\"\n        url = f\"{self._base_url}/skills\"\n        try:\n            response = self._client.get(\n                url, params={\"owner\": \"me\"}, headers={\"Authorization\": f\"Bearer {token}\"}\n            )\n        except httpx.HTTPError as exc:\n            raise HubError(f\"{self.name}: request failed: {exc}\") from exc\n        if response.status_code in (401, 403):\n            raise HubError(\n                f\"{self.name}: not authenticated — run `skill login` or pass a valid token.\"\n            )\n        if response.status_code >= 400:\n            raise HubError(f\"{self.name}: HTTP {response.status_code}: {response.text[:200]}\")\n        try:\n            payload = response.json()\n        except ValueError as exc:\n            raise HubError(f\"{self.name}: invalid JSON listing skills\") from exc\n        rows = payload.get(\"skills\") if isinstance(payload, dict) else None\n        return [row for row in (rows or []) if isinstance(row, dict)]\n\n    def set_dist_tag(\n        self,\n        slug: str,\n        *,\n        version: str,\n        token: str,\n        tag: str = \"latest\",\n    ) -> dict[str, Any]:\n        \"\"\"Move a dist-tag (default ``latest``) to an existing version (rollback).\"\"\"\n        url = f\"{self._base_url}/skills/{slug}/dist-tags\"\n        try:","sourceCodeStart":488,"sourceCodeEnd":524,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/services/skill/hub.py#L488-L524","documentation":"Raised by list_my_skills when the hub returns an unexpected HTTP >= 400 (other than 401/403) to the owner=me listing. The message includes the status code and first 200 characters of the response body for diagnosis.","triggerScenarios":"Calling list_my_skills when the hub hits 500, returns 404 (endpoint absent in that hub version), or 429 (rate limited).","commonSituations":"Hub version that lacks the owner=me filter; server-side error; rate limiting from aggressive polling.","solutions":["Read the embedded body snippet to identify the server-side cause","Retry after a delay if rate-limited (429)","Upgrade/align the hub version so /skills?owner=me exists","Report 5xx errors to the hub operator"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    hub.list_my_skills(token)\nexcept HubError as e:\n    if \"HTTP 429\" in str(e):\n        time.sleep(int(e_retry_after or 30)); return hub.list_my_skills(token)\n    raise","preventionTips":["Rate-limit your own polling","Surface the embedded body snippet in logs for diagnosis"],"tags":["hub","http-error","list-skills"],"backgroundTag":"api-request-rejected","analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}