Skip to content

Commit

Permalink
Merge pull request #1 from TodayTix/emit-error-on-redirect
Browse files Browse the repository at this point in the history
fix(main) emit error on redirect
  • Loading branch information
Balanced02 authored Aug 23, 2023
2 parents d9fb108 + 7a4fe34 commit 7bea2df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ module.exports = function SitemapGenerator(uri, opts) {
crawler.on('fetchprevented', ({
url
}) => emitError(403, url));
crawler.on('fetchredirect', ({url}) => {
emitError(301, url)
return;
})

crawler.on('queueerror', ({
url
Expand Down

0 comments on commit 7bea2df

Please sign in to comment.