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

bug(http) 404 error always appears in console even if caught #8832

Closed
abuda7em opened this issue May 25, 2016 · 4 comments
Closed

bug(http) 404 error always appears in console even if caught #8832

abuda7em opened this issue May 25, 2016 · 4 comments

Comments

@abuda7em
Copy link

When trying to send a request to a url that returns 404 error, the error will always appear in console even if I catch it.

This behavior happens when using @angular/http, or even when using the native XMLHttpRequest, Which makes me think it's a zone task issue.

Please refer to this plunk

Expected/desired behavior

I think the error message should not appear in console if the error was caught.

@zoechi
Copy link
Contributor

zoechi commented May 25, 2016

This issue doesn't provide enough information to reproduce or debug the issue.
If http://stackoverflow.com/questions/37430092/angular-2-how-to-handle-404-before-logging-to-browser-console is also from you, please provide enough information there, so it can be reproduced.

GitHub issues are for bug reports and feature requests.
For support questions please use other channels like the ones listed in CONTRIBUTING - Got a Question or Problem?

@jeffbcross
Copy link
Contributor

This is just default browser behavior. See this plunker without angular or zones and the 404 is still logged: http://plnkr.co/edit/FUj5kgPPNyGzUnc3e07i?p=preview

@codermannn
Copy link

You could use GlobalErrorHandler that extends the ErrorHandler and implement the handleError() method. It shouldnt throw it to the browser then.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants