fix(iterator): surface blob listing errors for better diagnostics (#1017)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Cory LaNou
2026-01-19 15:23:23 -06:00
committed by GitHub
parent ed28f2ee62
commit 6a82fc0921
4 changed files with 7 additions and 7 deletions

View File

@@ -394,7 +394,7 @@ func newLTXFileIterator(ctx context.Context, client *ReplicaClient, level int, s
func (itr *ltxFileIterator) Close() (err error) {
itr.closed = true
itr.cancel()
return nil
return itr.err
}
func (itr *ltxFileIterator) Next() bool {

View File

@@ -503,7 +503,7 @@ func (itr *ltxFileIterator) Err() error {
return itr.err
}
// Close closes the iterator.
// Close closes the iterator and returns any error that occurred during iteration.
func (itr *ltxFileIterator) Close() error {
return nil
return itr.err
}

View File

@@ -501,11 +501,11 @@ func (itr *fileIterator) initPaginator() {
})
}
// Close stops iteration.
// Close stops iteration and returns any error that occurred during iteration.
func (itr *fileIterator) Close() (err error) {
itr.closed = true
itr.cancel()
return nil
return itr.err
}
// Next returns the next file. Returns false when no more files are available.

View File

@@ -1166,11 +1166,11 @@ func (itr *fileIterator) fetchMetadataBatch(keys []string) error {
return nil
}
// Close stops iteration.
// Close stops iteration and returns any error that occurred during iteration.
func (itr *fileIterator) Close() (err error) {
itr.closed = true
itr.cancel()
return nil
return itr.err
}
// Next returns the next file. Returns false when no more files are available.