{"record":{"id":"e12c9f8bdd9225cc","repo":"goharbor/harbor","slug":"invalid-log-identify","errorCode":null,"errorMessage":"invalid log identify","messagePattern":"invalid log identify","errorType":"validation","errorClass":null,"httpStatus":500,"severity":"error","filePath":"src/jobservice/logger/getter/file_getter.go","lineNumber":73,"sourceCode":"\t\treturn nil, errs.NoObjectFoundError(logID)\n\t}\n\n\treturn tailLogFile(fPath, logSizeLimit())\n}\n\nfunc isValidLogID(id string) error {\n\tlid := id\n\tsegment := strings.LastIndex(lid, \"@\")\n\tif segment != -1 {\n\t\tlid = lid[:segment]\n\t}\n\n\tif len(lid) != 24 {\n\t\treturn errors.New(\"invalid length of log identify\")\n\t}\n\n\tif _, err := hex.DecodeString(lid); err != nil {\n\t\treturn errors.New(\"invalid log identify\")\n\t}\n\n\treturn nil\n}\n\nfunc tailLogFile(filename string, limit int64) ([]byte, error) {\n\tfInfo, err := os.Stat(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsize := fInfo.Size()\n\n\tvar sizeToRead int64\n\tif limit <= 0 {\n\t\tsizeToRead = size\n\t} else {\n\t\tsizeToRead = limit\n\t}","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/jobservice/logger/getter/file_getter.go#L55-L91","documentation":"Sentinel validation inside isValidLogID: after stripping the '@segment' suffix, the log ID must be 24 hex characters (a MongoDB-style object ID). This error fires when the ID has the right length but contains non-hex characters, so it cannot map to a job's log file.","triggerScenarios":"Thrown at src/jobservice/logger/getter/file_getter.go:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the exact hexadecimal job UUID returned when the job was enqueued","Check that the ID was not truncated, re-encoded or corrupted in transit"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}