Skip to content

Commit

Permalink
catch finish errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eshaham committed May 24, 2019
1 parent 540369a commit eba0f77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/scrapers/base-scraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ class BaseScraper {
scrapeResult = loginResult;
}

await this.terminate();
try {
await this.terminate();
} catch (e) {
scrapeResult = createGenericError(e.message);
}
this.emitProgress(SCRAPE_PROGRESS_TYPES.END_SCRAPING);

return scrapeResult;
Expand Down

0 comments on commit eba0f77

Please sign in to comment.