Skip to content

Commit

Permalink
exit properly if blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
frmacdonald committed Oct 3, 2019
1 parent f01ca96 commit 5d3a211
Show file tree
Hide file tree
Showing 2 changed files with 989 additions and 1,040 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ const articleParser = async function (options, socket) {
socket.emit('parse:status', 'Status ' + article.status)

if (article.status === 403 || article.status === 404) {
socket.emit('parse:status', 'Failed to fetch URL')
await browser.close()
return article.status + ' Failed to fetch URL'
process.exit(1)
}

// Evaluate URL
Expand Down
Loading

0 comments on commit 5d3a211

Please sign in to comment.