MCPcopy Create free account
hub / github.com/53AI/53AIHub / scanErrorToMessage

Function scanErrorToMessage

api/service/skill_library_scan.go:1159–1170  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

1157}
1158
1159func scanErrorToMessage(err error) string {
1160 if err == nil {
1161 return "扫描失败"
1162 }
1163 if errors.Is(err, ErrSkillScanMissingSkillMD) {
1164 return "文件不是技能,缺少SKILL.md"
1165 }
1166 if errors.Is(err, ErrSkillScanZipPathTraversal) {
1167 return "技能压缩包包含非法路径"
1168 }
1169 return fmt.Sprintf("扫描失败: %v", err)
1170}
1171
1172func parseSkillScanResultPayload(ctx context.Context, responseText string) (*skillScanResultPayload, error) {
1173 var payload skillScanResultPayload

Callers 1

executeScanJobMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected