diff --git a/internal/parser/parser.go b/internal/parser/parser.go index 985c576..2bd9407 100644 --- a/internal/parser/parser.go +++ b/internal/parser/parser.go @@ -234,7 +234,10 @@ func GetRecipe(r *models.Recipe, ps pictureSaver, rs recipeSaver, rp recipeProvi }) // check recipe exists ex, err := rp.RecipeExists(context.Background(), r.Title) // interface! - if err != nil || ex { + if err != nil { + return fmt.Errorf("%s: %w", op, err) + } + if ex { return fmt.Errorf("%s: %w", op, ErrRecipeExists) } // save picture