Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"error" event not triggered if initial URL is unreachable #44

Open
jsthind opened this issue Jul 17, 2018 · 5 comments
Open

"error" event not triggered if initial URL is unreachable #44

jsthind opened this issue Jul 17, 2018 · 5 comments

Comments

@jsthind
Copy link

jsthind commented Jul 17, 2018

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.

@Rob-Rychs
Copy link
Contributor

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.

@lgraubner
Copy link
Owner

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.

@Nayan-Das
Copy link

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

@lgraubner
Copy link
Owner

Sure, go for it.

@Rob-Rychs
Copy link
Contributor

how's it coming @Nayan-Das ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants