{"record":{"id":"b1bc80bc3de3813d","repo":"JuliusBrussee/caveman","slug":"zstd-read-w","errorCode":null,"errorMessage":"zstd read: %w","messagePattern":"zstd read: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/objectstore/compress.go","lineNumber":110,"sourceCode":"\t\t// tiny valid payloads, then independently enforce the exact byte limit.\n\t\tmemoryLimit := uint64(maxBytes)\n\t\tif memoryLimit < zstd.MinWindowSize {\n\t\t\tmemoryLimit = zstd.MinWindowSize\n\t\t}\n\t\tzr, err := zstd.NewReader(nil,\n\t\t\tzstd.WithDecoderConcurrency(1),\n\t\t\tzstd.WithDecoderMaxMemory(memoryLimit),\n\t\t)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"zstd reader: %w\", err)\n\t\t}\n\t\tdefer zr.Close()\n\t\tout, err := zr.DecodeAll(data, nil)\n\t\tif err != nil {\n\t\t\tif errors.Is(err, zstd.ErrDecoderSizeExceeded) || errors.Is(err, zstd.ErrWindowSizeExceeded) {\n\t\t\t\treturn nil, ErrDecompressedTooLarge\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"zstd read: %w\", err)\n\t\t}\n\t\tif int64(len(out)) > maxBytes {\n\t\t\treturn nil, ErrDecompressedTooLarge\n\t\t}\n\t\treturn out, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown compression codec %q\", codec)\n\t}\n}\n","sourceCodeStart":92,"sourceCodeEnd":120,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/objectstore/compress.go#L92-L120","documentation":"Error \"zstd read: %w\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/objectstore/compress.go:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the zstd read error; the data may be truncated."],"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"}