{"record":{"id":"cbb516044752fe61","repo":"juicedata/juicefs","slug":"get-not-existed-object-should-failed-s","errorCode":null,"errorMessage":"get not existed object should failed: %s","messagePattern":"get not existed object should failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/objbench.go","lineNumber":803,"sourceCode":"\n\trunCase(\"get an object\", func(blob object.ObjectStorage) error {\n\t\tbr := []byte(\"hello\")\n\t\tif err := blob.Put(ctx, key, bytes.NewReader(br)); err != nil {\n\t\t\treturn fmt.Errorf(\"put object failed: %s\", err)\n\t\t}\n\t\tdefer blob.Delete(ctx, key) //nolint:errcheck\n\t\tif d, e := get(blob, key, 0, -1); e != nil || d != string(br) {\n\t\t\treturn fmt.Errorf(`failed to get an object: expect \"hello\", but got %v, error: %s`, d, e)\n\t\t}\n\t\tif d, e := get(blob, key, 0, 5); e != nil || d != string(br) {\n\t\t\treturn fmt.Errorf(`failed to get an object: expect \"hello\", but got %v, error: %s`, d, e)\n\t\t}\n\t\treturn nil\n\t})\n\n\trunCase(\"get non-exist\", func(blob object.ObjectStorage) error {\n\t\tif _, err := blob.Get(ctx, \"not_exists_file\", 0, -1); err == nil {\n\t\t\treturn fmt.Errorf(\"get not existed object should failed: %s\", err)\n\t\t}\n\t\treturn nil\n\t})\n\n\trunCase(\"get partial object\", func(blob object.ObjectStorage) error {\n\t\tbr := []byte(\"hello\")\n\t\tif err := blob.Put(ctx, key, bytes.NewReader(br)); err != nil {\n\t\t\treturn fmt.Errorf(\"put object failed: %s\", err)\n\t\t}\n\t\tdefer blob.Delete(ctx, key) //nolint:errcheck\n\n\t\t// get first\n\t\tif d, e := get(blob, key, 0, 1); e != nil || d != \"h\" {\n\t\t\treturn fmt.Errorf(`failed to get the first byte:, expect \"h\", but got %q, error: %s`, d, e)\n\t\t}\n\t\t// get last\n\t\tif d, e := get(blob, key, 4, 1); e != nil || d != \"o\" {\n\t\t\treturn fmt.Errorf(`failed to get the last byte: expect \"o\", but got %q, error: %s`, d, e)","sourceCodeStart":785,"sourceCodeEnd":821,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/objbench.go#L785-L821","documentation":"Returned by objbench when attempting to GET a key that was never uploaded does not produce the expected not-found error path — the test expects the read of a nonexistent object to fail, and reports the unexpected error or content instead.","triggerScenarios":"Thrown at cmd/objbench.go:803 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the backend returns proper 404-style errors for missing objects"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}