diff --git a/pkg/thumb/ffmpeg.go b/pkg/thumb/ffmpeg.go index e0742509..0112b8e6 100644 --- a/pkg/thumb/ffmpeg.go +++ b/pkg/thumb/ffmpeg.go @@ -94,7 +94,7 @@ func (f *FfmpegGenerator) Generate(ctx context.Context, es entitysource.EntitySo if err := cmd.Run(); err != nil { f.l.Warning("Failed to invoke ffmpeg: %s", stdErr.String()) - return &Result{Path: tempOutputPath}, fmt.Errorf("failed to invoke ffmpeg: %w, raw output: %s", err, stdErr.String()) + return &Result{Path: tempOutputPath}, fmt.Errorf("failed to invoke ffmpeg: %w, raw output: %s: %w", err, stdErr.String(), ErrPassThrough) } return &Result{Path: tempOutputPath}, nil diff --git a/pkg/thumb/libreoffice.go b/pkg/thumb/libreoffice.go index 89fbdef4..42d6abd7 100644 --- a/pkg/thumb/libreoffice.go +++ b/pkg/thumb/libreoffice.go @@ -79,7 +79,7 @@ func (l *LibreOfficeGenerator) Generate(ctx context.Context, es entitysource.Ent if err := cmd.Run(); err != nil { l.l.Warning("Failed to invoke LibreOffice: %s", stdErr.String()) - return &Result{Path: tempOutputPath}, fmt.Errorf("failed to invoke LibreOffice: %w, raw output: %s", err, stdErr.String()) + return &Result{Path: tempOutputPath}, fmt.Errorf("failed to invoke LibreOffice: %w, raw output: %s: %w", err, stdErr.String(), ErrPassThrough) } return &Result{ diff --git a/pkg/thumb/vips.go b/pkg/thumb/vips.go index bd344fd2..99dadca5 100644 --- a/pkg/thumb/vips.go +++ b/pkg/thumb/vips.go @@ -105,7 +105,10 @@ func (v *VipsGenerator) Generate(ctx context.Context, es entitysource.EntitySour if err := cmd.Run(); err != nil { v.l.Warning("Failed to invoke vips: %s", vipsErr.String()) - return &Result{Path: tempPath}, fmt.Errorf("failed to invoke vips: %w, raw output: %s", err, vipsErr.String()) + // A non-zero exit usually means vips cannot decode the format (e.g. + // psd, html). Pass through so later generators can try instead of + // failing the whole pipeline. + return &Result{Path: tempPath}, fmt.Errorf("failed to invoke vips: %w, raw output: %s: %w", err, vipsErr.String(), ErrPassThrough) } return &Result{Path: tempPath}, nil