fix(worker.go): an error reaches the log, the row and the page as a kind, never its text (adversarial review F3, F5)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.d-ma.be/mathias/tapir/internal/domain"
|
||||
"git.d-ma.be/mathias/tapir/internal/errkind"
|
||||
"git.d-ma.be/mathias/tapir/internal/progress"
|
||||
)
|
||||
|
||||
@@ -236,7 +237,7 @@ func (w *Worker) Process(ctx context.Context, job Job) {
|
||||
defer cancel()
|
||||
tr.Begin("audio", 0)
|
||||
if err := w.conv.ToWAV(jobCtx, job.Path, wav); err != nil {
|
||||
log.Error("upload: convert", "err", err)
|
||||
log.Error("upload: convert", "kind", errkind.Of(err))
|
||||
abort()
|
||||
return
|
||||
}
|
||||
@@ -247,7 +248,7 @@ func (w *Worker) Process(ctx context.Context, job Job) {
|
||||
}
|
||||
t, err := w.tr.Transcribe(progress.With(jobCtx, tr), wav)
|
||||
if err != nil {
|
||||
log.Error("upload: transcribe", "err", err, "elapsed", time.Since(start).Round(time.Second))
|
||||
log.Error("upload: transcribe", "kind", errkind.Of(err), "elapsed", time.Since(start).Round(time.Second))
|
||||
abort()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user