From 34b1354179d41a27035968dd20fdd2da4ac35765 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 21 Mar 2022 18:43:10 +0000 Subject: rescribe: Improve error messages if no pages are found --- cmd/rescribe/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmd/rescribe') diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go index 67ae8a7..a743ef2 100644 --- a/cmd/rescribe/main.go +++ b/cmd/rescribe/main.go @@ -622,12 +622,12 @@ func uploadbook(ctx context.Context, dir string, name string, conn Pipeliner, no func downloadbook(dir string, name string, conn Pipeliner) error { err := pipeline.DownloadBestPages(dir, name, conn) if err != nil { - return fmt.Errorf("Error downloading best pages: %v", err) + return fmt.Errorf("No images found") } - err1 := pipeline.DownloadBestPngs(dir, name, conn) - if err1 != nil { - return fmt.Errorf("Error downloading best pngs: %v", err) + err = pipeline.DownloadBestPngs(dir, name, conn) + if err != nil { + return fmt.Errorf("No images found") } err = pipeline.DownloadPdfs(dir, name, conn) -- cgit v1.2.1-24-ge1ad