Skip to content

Commit 03041fc

Browse files
Do not log nil error in bulk indexer (#574) (#578)
Co-authored-by: Tim Rühsen <[email protected]>
1 parent c575c82 commit 03041fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

esutil/bulk_indexer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ func (w *worker) flush(ctx context.Context) error {
610610
atomic.AddUint64(&w.bi.stats.numFailed, uint64(len(w.items)))
611611
// TODO(karmi): Wrap error (include response struct)
612612
if w.bi.config.OnError != nil {
613-
w.bi.config.OnError(ctx, fmt.Errorf("flush: %s", err))
613+
w.bi.config.OnError(ctx, fmt.Errorf("flush: %s", res.String()))
614614
}
615615
return fmt.Errorf("flush: %s", res.String())
616616
}

0 commit comments

Comments
 (0)