fix: fast fail of bulk importer (#1394)

* use continue instead of break

* catch additional error case

* spelling is hard
This commit is contained in:
Hayden 2022-06-15 18:19:52 -08:00 committed by GitHub
parent 525842e9a1
commit b1256f4ad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@
<v-card-text>
Grab the URL of the recipe you want to debug and paste it here. The URL will be scraped by the recipe scraper
and the results will be displayed. If you don't see any data returned, the site you are trying to scrape is
not supported by Mealie or it's scraper library.
not supported by Mealie or its scraper library.
<v-text-field
v-model="recipeUrl"
:label="$t('new-recipe.recipe-url')"

View File

@ -77,7 +77,7 @@ class RecipeBulkScraperService(BaseService):
self.service.logger.error(f"failed to scrape url during bulk url import {b.url}")
self.service.logger.exception(e)
self._add_error_entry(f"failed to scrape url {b.url}", str(e))
break
continue
if b.tags:
recipe.tags = b.tags
@ -90,7 +90,8 @@ class RecipeBulkScraperService(BaseService):
except Exception as e:
self.service.logger.error(f"Failed to save recipe to database during bulk url import {b.url}")
self.service.logger.exception(e)
self._add_error_entry("Failed to save recipe to database during bulk url import", str(e))
self._add_error_entry(f"Failed to save recipe to database during bulk url import {b.url}", str(e))
continue
self.report_entries.append(
ReportEntryCreate(