sitemap-generator icon indicating copy to clipboard operation
sitemap-generator copied to clipboard

"error" event not triggered if initial URL is unreachable

Open jsthind opened this issue 6 years ago • 5 comments

Do you want to request a feature or report a bug? bug

What is the current behavior? Passing an unreachable domain (For example http://sdfdfdteterter.com ) does not trigger the "error" event.

If the current behavior is a bug, please provide the steps to reproduce. const generator = SitemapGenerator("http://sdfdfdteterter.com"); generator.start();

What is the expected behavior? "error" event should be triggered if the initial URL is unreachable.

jsthind avatar Jul 17 '18 13:07 jsthind

I think this is resolved? tried with the above domain and error is firing: throw new Error(Site "${parsedUrl.href}" could not be found.); ^

Error: Site "https://sdfdfdteterter.com" could not be found.

Rob-Rychs avatar Sep 04 '18 06:09 Rob-Rychs

Not sure, there might be some edge cases. The error @Rob-Rychs got is caused by a client error (but might be thrown if site is not reachable/dns entry not found. (See here). Additionally you could subscribe to the error event which might fire a 404.

lgraubner avatar Sep 06 '18 06:09 lgraubner

If this issue is not solve can I take this up?

Nayan-Das avatar Oct 27 '18 10:10 Nayan-Das

Sure, go for it.

lgraubner avatar Oct 27 '18 10:10 lgraubner

how's it coming @Nayan-Das ?

Rob-Rychs avatar Dec 25 '18 12:12 Rob-Rychs