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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong error type in httpclient doc #34748

wildsalarian opened this issue Jan 12, 2020 · 0 comments

Wrong error type in httpclient doc #34748

wildsalarian opened this issue Jan 12, 2020 · 0 comments


Copy link

@wildsalarian wildsalarian commented Jan 12, 2020

馃摎 Docs or bug report


A type was changed in a recent commit in angular which is not yet represented in the docs.

What's the affected URL?**

Reproduction Steps**

In the code snippet app/config/config.service.ts there is this line:

if (error.error instanceof ErrorEvent)

In case of a network error (or similar like a CORS error) the error property of the HttpErrorResponse is should be according to the docs an ErrorEvent. But in my tests always seems to be a ProgressEvent.

In this recent commit
in the file
the type of the error property of the returned HttpErrorResponse was changed from ErrorEvent to ProgressEvent.

Unfortunately unlike ErrorEvent the ProgressEvent has no message property. It is only usable as a indicator for a network error. The message property of the HttpErrorResponse itself has to be queried to retrieve a human readable error message.

The behaviour can be tested in

I am using Angular 8.2.14

@ngbot ngbot bot added this to the needsTriage milestone Jan 13, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jan 13, 2020
@kapunahelewong kapunahelewong added this to Need Assistance from Eng. in docs Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Need Assistance from Eng.
3 participants
You can鈥檛 perform that action at this time.