{"record":{"id":"1a8b9371034b3377","repo":"goharbor/harbor","slug":"unsupported-format-s","errorCode":null,"errorMessage":"unsupported format: %s","messagePattern":"unsupported format: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/controller/artifact/processor/cnai/parser/base.go","lineNumber":106,"sourceCode":"\tcontent, err := decodeContent(layer.MediaType, stream, defaultFileSizeLimit)\n\tif err != nil {\n\t\treturn \"\", nil, fmt.Errorf(\"failed to decode content: %w\", err)\n\t}\n\n\treturn contentTypeTextPlain, content, nil\n}\n\n// decodeContent decodes the content read from reader according to mediaType,\n// enforcing that no more than limit bytes are materialized in memory.\nfunc decodeContent(mediaType string, reader io.Reader, limit int64) ([]byte, error) {\n\tformat := filepath.Ext(mediaType)\n\tswitch format {\n\tcase formatTar:\n\t\treturn untar(reader, limit)\n\tcase formatRaw:\n\t\treturn readAllLimited(reader, limit)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported format: %s\", format)\n\t}\n}\n\n// readAllLimited reads from reader until EOF, but fails once more than limit\n// bytes have been read.\nfunc readAllLimited(reader io.Reader, limit int64) ([]byte, error) {\n\tif limit < 0 {\n\t\treturn nil, fmt.Errorf(\"invalid limit: %d\", limit)\n\t}\n\n\t// Read up to limit+1 bytes so we can distinguish \"exactly at the limit\"\n\t// from \"over the limit\".\n\tcontent, err := io.ReadAll(io.LimitReader(reader, limit+1))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif int64(len(content)) > limit {","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/controller/artifact/processor/cnai/parser/base.go#L88-L124","documentation":"Error \"unsupported format: %s\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/controller/artifact/processor/cnai/parser/base.go:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}