{"record":{"id":"ec802fb187dab0fc","repo":"openai/openai-python","slug":"expected-a-non-empty-value-for-skill-id-but-rece","errorCode":null,"errorMessage":"Expected a non-empty value for `skill_id` but received {skill_id!r}","messagePattern":"Expected a non-empty value for `skill_id` but received (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/openai/resources/skills/content.py","lineNumber":67,"sourceCode":"        extra_headers: Headers | None = None,\n        extra_query: Query | None = None,\n        extra_body: Body | None = None,\n        timeout: float | httpx2.Timeout | None | NotGiven = not_given,\n    ) -> _legacy_response.HttpxBinaryResponseContent:\n        \"\"\"\n        Download a skill zip bundle by its ID.\n\n        Args:\n          extra_headers: Send extra headers\n\n          extra_query: Add additional query parameters to the request\n\n          extra_body: Add additional JSON properties to the request\n\n          timeout: Override the client-level default timeout for this request, in seconds\n        \"\"\"\n        if not skill_id:\n            raise ValueError(f\"Expected a non-empty value for `skill_id` but received {skill_id!r}\")\n        extra_headers = {\"Accept\": \"application/binary\", **(extra_headers or {})}\n        return self._get(\n            path_template(\"/skills/{skill_id}/content\", skill_id=skill_id),\n            options=make_request_options(\n                extra_headers=extra_headers,\n                extra_query=extra_query,\n                extra_body=extra_body,\n                timeout=timeout,\n                security={\"bearer_auth\": True},\n            ),\n            cast_to=_legacy_response.HttpxBinaryResponseContent,\n        )\n\n\nclass AsyncContent(AsyncAPIResource):\n    @cached_property\n    def with_raw_response(self) -> AsyncContentWithRawResponse:\n        \"\"\"","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/openai/openai-python/blob/9917c6e28e66e90e1227b3d223c06a8c5441515a/src/openai/resources/skills/content.py#L49-L85","documentation":"Standard SDK guard: skills.content.retrieve (sync) requires a non-empty skill_id path parameter. Passing an empty string or another falsy value (None via default) raises ValueError before any HTTP request is made, because the request path /skills/{skill_id}/content would be malformed.","triggerScenarios":"Calling client.skills.content.retrieve(skill_id=\"\"), with None, or with a variable that was never populated (e.g. from a config value or upstream response field that is empty).","commonSituations":"Reading skill IDs from environment variables or config that are unset; iterating a list where an entry is blank; chaining from a create/list response whose ID field was missed.","solutions":["Check the skill_id variable is a non-empty string before calling retrieve","Log or default the value where it originates (env var, config, loop)","If it comes from an upstream API response, inspect that response for the missing id field"],"exampleFix":"# before\ncontent = client.skills.content.retrieve(skill_id=skill_id)\n\n# after\nif not skill_id:\n    raise ValueError(\"skill_id is required\")\ncontent = client.skills.content.retrieve(skill_id=skill_id)","handlingStrategy":"validation","validationCode":"if not isinstance(skill_id, str) or not skill_id.strip():\n    raise ValueError(f\"valid skill_id required, got {skill_id!r}\")\ncontent = client.skills.content.retrieve(skill_id=skill_id)","typeGuard":"def is_valid_skill_id(value: object) -> bool:\n    return isinstance(value, str) and bool(value.strip())","tryCatchPattern":null,"preventionTips":["Validate IDs at the system boundary (env vars, request params, config files)","Use IDE typing (skill_id: str) plus a runtime strip() check","Derive IDs from SDK responses instead of hand-typed strings"],"tags":["skills","validation","path-parameter","argument-error"],"backgroundTag":"required-parameter-missing","analyzedSha":"9917c6e28e66e90e1227b3d223c06a8c5441515a","analyzedAt":"2026-08-28T11:46:34.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}