浏览代码

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
+          })
         })
       })
     }