{"record":{"id":"d9523e48c74703a5","repo":"JuliusBrussee/caveman","slug":"objectstore-put-q-w","errorCode":null,"errorMessage":"objectstore: put %q: %w","messagePattern":"objectstore: put %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/objectstore/objectstore.go","lineNumber":278,"sourceCode":"\tcleaned = true\n\texists, err := store.Exists(ctx, key)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif exists {\n\t\treturn errors.New(\"probe object still exists after purge\")\n\t}\n\treturn nil\n}\n\nfunc (m *minioStore) Put(ctx context.Context, key string, body []byte, contentType string) error {\n\tif contentType == \"\" {\n\t\tcontentType = \"application/octet-stream\"\n\t}\n\t_, err := m.client.PutObject(ctx, m.bucket, key, bytes.NewReader(body), int64(len(body)),\n\t\tminio.PutObjectOptions{ContentType: contentType})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"objectstore: put %q: %w\", key, err)\n\t}\n\treturn nil\n}\n\nfunc (m *minioStore) Get(ctx context.Context, key string) ([]byte, error) {\n\tobj, err := m.client.GetObject(ctx, m.bucket, key, minio.GetObjectOptions{})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"objectstore: get %q: %w\", key, err)\n\t}\n\tdefer obj.Close()\n\tmaxBytes := int64(env.Int(\"CAVE_OBJECTSTORE_MAX_READ_BYTES\", 64<<20))\n\tif maxBytes <= 0 {\n\t\tmaxBytes = 64 << 20\n\t}\n\tbody, err := io.ReadAll(io.LimitReader(obj, maxBytes+1))\n\tif err != nil {\n\t\tif minio.ToErrorResponse(err).Code == \"NoSuchKey\" {\n\t\t\treturn nil, ErrNotFound","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/objectstore/objectstore.go#L260-L296","documentation":"Error \"objectstore: put %q: %w\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/objectstore/objectstore.go:278 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the object put error and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}