feat: improve error logging during import
1 file changed, 9 insertions(+), 4 deletions(-)
changed files
M internal/importer/utils.go → internal/importer/utils.go
@@ -85,6 +85,10 @@ go func() { for { select { case err, running := <-srcErrs: + if err != nil { + hadObjectErrors = true + log.Warn("error processing object from source", "error", err) + } if !running { wg.Done() srcErrs = nil@@ -92,17 +96,18 @@ log.Debug("processing completed") continue } - hadObjectErrors = true - log.Warn("error processing object from source", "error", err) case err, running := <-dstErrors: + if err != nil { + hadObjectErrors = true + log.Warn("error writing object to target", "error", err) + + } if !running { wg.Done() dstErrors = nil continue } - hadObjectErrors = true - log.Warn("error writing object to target", "error", err) } } }()