about summary refs log tree commit diff stats
path: root/internal/importer/main.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-23 11:45:38 +0200
committerAlan Pearce2024-05-23 11:45:38 +0200
commit3053e41b1528ef898cccd44e056e4d167619af6b (patch)
treea83da2e8cfcaf824a57d26e9e5ef55b95f14e603 /internal/importer/main.go
parent3149660f0fcbad484a71703cf2f7f715abc130ba (diff)
downloadsearchix-3053e41b1528ef898cccd44e056e4d167619af6b.tar.lz
searchix-3053e41b1528ef898cccd44e056e4d167619af6b.tar.zst
searchix-3053e41b1528ef898cccd44e056e4d167619af6b.zip
fix: abort import of source on batch processing errors
Diffstat (limited to 'internal/importer/main.go')
-rw-r--r--internal/importer/main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/importer/main.go b/internal/importer/main.go
index 663e8eb..6f462c3 100644
--- a/internal/importer/main.go
+++ b/internal/importer/main.go
@@ -124,7 +124,12 @@ func Start(
 				continue
 			}
 
-			hadWarnings := process(ctx, indexer, processor, logger)
+			hadWarnings, err := process(ctx, indexer, processor, logger)
+			if err != nil {
+				logger.Error("failed to process source", "error", err)
+
+				continue
+			}
 
 			if hadWarnings {
 				logger.Warn("importer succeeded, but with warnings/errors")