Parcourir la source

Show error when scraping recipe failed

Tatiana Inama il y a 6 ans
Parent
commit
09ca72f7ba
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  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
+          })
         })
       })
     }