Quellcode durchsuchen

Show error when scraping recipe failed

Tatiana Inama vor 6 Jahren
Ursprung
Commit
09ca72f7ba
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. 5 0
      recipes/src/containers/Recipes/Create/index.tsx

+ 5 - 0
recipes/src/containers/Recipes/Create/index.tsx

@@ -51,6 +51,11 @@ class CreateRecipe extends React.Component<any, CreateRecipeState> {
               course: recipe.course || [],
             }
           })
+        }).catch(e => {
+          toast.error("There was an error scraping the recipe: " + e);
+          this.setState({
+            scrapingRecipe: false
+          })
         })
       })
     }