about summary refs log tree commit diff stats
path: root/internal/importer/importer.go
diff options
context:
space:
mode:
authorAlan Pearce2025-03-12 22:39:51 +0100
committerAlan Pearce2025-03-12 22:39:51 +0100
commit9015baf955c94a806c01b3dcd5648c8e68ad2685 (patch)
tree5f59386c2ab31b6e45b85576e45a1fc8ae448ae0 /internal/importer/importer.go
parent7bb77ff5729cc9434afee895a470fd3b4c12e6d1 (diff)
downloadsearchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.tar.lz
searchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.tar.zst
searchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.zip
refactor: ensure errors have stack traces HEAD main
Diffstat (limited to 'internal/importer/importer.go')
-rw-r--r--internal/importer/importer.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/importer/importer.go b/internal/importer/importer.go
index 0b2db43..9334f7d 100644
--- a/internal/importer/importer.go
+++ b/internal/importer/importer.go
@@ -4,13 +4,14 @@ import (
 	"context"
 	"sync"
 
+	"gitlab.com/tozd/go/errors"
 	"go.alanpearce.eu/searchix/internal/index"
 	"go.alanpearce.eu/searchix/internal/nix"
 	"go.alanpearce.eu/x/log"
 )
 
 type Processor interface {
-	Process(context.Context) (<-chan nix.Importable, <-chan error)
+	Process(context.Context) (<-chan nix.Importable, <-chan errors.E)
 }
 
 func process(
@@ -18,7 +19,7 @@ func process(
 	indexer *index.WriteIndex,
 	processor Processor,
 	logger *log.Logger,
-) (bool, error) {
+) (bool, errors.E) {
 	wg := sync.WaitGroup{}
 
 	wg.Add(1)
@@ -28,7 +29,7 @@ func process(
 	iErrs := indexer.Import(ctx, objects)
 
 	var hadObjectErrors bool
-	var criticalError error
+	var criticalError errors.E
 	go func() {
 		for {
 			select {