Skip to content

Uncaught TypeError: Cannot read property 'ngOriginalError' of null #18523

@raxkaynan

Description

@raxkaynan

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

When I receive an error from the server (e.g. 404), the console shows 'Uncaught TypeError: Cannot read property ngOriginalError' of null. I use an Observable for handling HTTP requests. The error from the server isn't null and when logged on the console it shows as a Response object when handled within the Observable's catch method.

Error snapshot:
image

It seems that the error comes from this snippet:

export function getOriginalError(error: Error): Error {
  return (error as any)[ERROR_ORIGINAL_ERROR];
}

found in this file.

Environment


Angular version: 4.1.2


Browser:
- [x] Chrome (desktop) version 59
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtimeneeds reproductionThis issue needs a reproduction in order for the team to investigate further

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions