{"record":{"id":"d797d40ce36edf84","repo":"benbjohnson/litestream","slug":"abs-cannot-start-new-reader-for-q-w","errorCode":null,"errorMessage":"abs: cannot start new reader for %q: %w","messagePattern":"abs: cannot start new reader for %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"abs/replica_client.go","lineNumber":283,"sourceCode":"// OpenLTXFile returns a reader for an LTX file.\n// Returns os.ErrNotExist if no matching min/max TXID is not found.\nfunc (c *ReplicaClient) OpenLTXFile(ctx context.Context, level int, minTXID, maxTXID ltx.TXID, offset, size int64) (io.ReadCloser, error) {\n\tif err := c.Init(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\n\tkey := litestream.LTXFilePath(c.Path, level, minTXID, maxTXID)\n\tresp, err := c.client.DownloadStream(ctx, c.Bucket, key, &azblob.DownloadStreamOptions{\n\t\tRange: blob.HTTPRange{\n\t\t\tOffset: offset,\n\t\t\tCount:  size,\n\t\t},\n\t})\n\n\tif isNotExists(err) {\n\t\treturn nil, os.ErrNotExist\n\t} else if err != nil {\n\t\treturn nil, fmt.Errorf(\"abs: cannot start new reader for %q: %w\", key, err)\n\t}\n\n\tinternal.OperationTotalCounterVec.WithLabelValues(ReplicaClientType, \"GET\").Inc()\n\tinternal.OperationBytesCounterVec.WithLabelValues(ReplicaClientType, \"GET\").Add(float64(*resp.ContentLength))\n\n\treturn resp.Body, nil\n}\n\n// DeleteLTXFiles deletes LTX files.\nfunc (c *ReplicaClient) DeleteLTXFiles(ctx context.Context, a []*ltx.FileInfo) error {\n\tif err := c.Init(ctx); err != nil {\n\t\treturn err\n\t}\n\n\tfor _, info := range a {\n\t\tkey := litestream.LTXFilePath(c.Path, info.Level, info.MinTXID, info.MaxTXID)\n\n\t\tc.logger.Debug(\"deleting ltx file\", \"level\", info.Level, \"minTXID\", info.MinTXID, \"maxTXID\", info.MaxTXID, \"key\", key)","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/benbjohnson/litestream/blob/4ed7a308f6271ebfd2b0a6e4b70b03011a37e4a3/abs/replica_client.go#L265-L301","documentation":"abs.OpenLTXFile's DownloadStream call failed for a reason other than not-exists while opening an LTX file for ranged read. Typically a network failure, authorization error, or an invalid range request against Azure Blob Storage.","triggerScenarios":"Thrown at abs/replica_client.go:283 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped azblob error code to distinguish auth from network issues","Verify credential permissions include read (Storage Blob Data Reader)","Retry the operation; transient Azure errors are retried on subsequent sync/restore attempts"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4ed7a308f6271ebfd2b0a6e4b70b03011a37e4a3","analyzedAt":"2026-09-06T18:29:25.564Z","contentChangedAt":"2026-09-06T18:29:25.564Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}