ソースを参照

Show error when scraping recipe failed

Tatiana Inama 6 年 前
コミット
09ca72f7ba
1 ファイル変更5 行追加0 行削除
  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
+          })
         })
       })
     }