{"record":{"id":"4231e399ca208132","repo":"iflytek/astron-agent","slug":"read-failed","errorCode":"read_failed","errorMessage":"read_skill completed, skillId={}, status=failed, errorType={}","messagePattern":"read_skill completed, skillId=(.+?), status=failed, errorType=(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/chat/springai/ReadSkillToolCallback.java","lineNumber":76,"sourceCode":"        result.put(\"description\", description);\n        try {\n            if (StringUtils.isNotBlank(requestedPath)) {\n                JSONObject resource = findResource(requestedPath);\n                if (resource == null) {\n                    result.put(\"path\", requestedPath);\n                    result.put(\"error\", \"resource_not_found\");\n                    result.put(\"available_resources\", manifest());\n                    return result.toJSONString();\n                }\n                result.put(\"path\", normalizePath(resource.getString(\"path\")));\n                result.put(\"content\", runtime.downloadText(resource.getString(\"downloadUrl\")));\n                return logSuccess(result);\n            }\n            result.put(\"content\", runtime.downloadText(downloadUrl));\n            result.put(\"resources\", manifest());\n            return logSuccess(result);\n        } catch (Exception e) {\n            log.warn(\n                    \"read_skill completed, skillId={}, status=failed, errorType={}\",\n                    skillId,\n                    e.getClass().getSimpleName());\n            result.put(\"error\", \"read_failed\");\n            return result.toJSONString();\n        }\n    }\n\n    private String logSuccess(JSONObject result) {\n        String serialized = result.toJSONString();\n        log.info(\n                \"read_skill completed, skillId={}, status=success, responseBytes={}\",\n                skillId,\n                serialized.getBytes(java.nio.charset.StandardCharsets.UTF_8).length);\n        return serialized;\n    }\n\n    private String parsePath(String toolInput) {","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/chat/springai/ReadSkillToolCallback.java#L58-L94","documentation":"ReadSkillToolCallback.call reads a skill's content: it downloads the skill text via runtime.downloadText(downloadUrl) and returns its manifest. Any exception (download failure, invalid manifest, missing skill) is caught, logged as a warning with only the exception class name, and converted to a JSON result with error code 'read_failed' — details are deliberately not returned to the model.","triggerScenarios":"downloadText fails (skill file missing in object storage, presigned URL expired, network error), manifest() throws, or the skillId does not exist in the runtime while the agent calls the read_skill tool.","commonSituations":"Skill artifact deleted or not uploaded to storage; expired/invalid download URL; storage service (MinIO/S3) outage; malformed skill package; skill deleted between listing and reading.","solutions":["Check hub logs for the full exception stack trace (details are logged server-side, not returned)","Verify the skill file exists in object storage and the download URL is valid/not expired","Confirm object storage (MinIO/S3) is reachable and healthy","Re-upload or recreate the skill if its artifact is missing"],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { result.put(\"content\", runtime.downloadText(downloadUrl)); } catch (Exception e) { log.warn(\"read_skill failed, skillId={}, errorType={}\", skillId, e.getClass().getSimpleName(), e); result.put(\"error\", \"read_failed\"); }","preventionTips":["Validate skillId existence before downloading","Use refreshable credentials/short-URL regeneration for object storage downloads","Keep skill artifacts and manifests together and verify on upload","Alert on object-storage error rates affecting skill reads"],"tags":["skill","download","tool-call","io"],"backgroundTag":"file-read-failed","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}