the information is from angular/angular#19923
Regular errors, such as HTTP errors, are correctly be logged as
ERROR HttpErrorResponse
When an error occur in a resolve guard, I get a weird stack trace:
ERROR Error: Uncaught (in promise): [object Object]
at resolvePromise (unpkg.com/zone.js@0.8.12/dist/zone.js:770)
at resolvePromise (unpkg.com/zone.js@0.8.12/dist/zone.js:741)
at eval (unpkg.com/zone.js@0.8.12/dist/zone.js:818)
at ZoneDelegate.invokeTask (unpkg.com/zone.js@0.8.12/dist/zone.js:424)
at Object.onInvokeTask (unpkg.com/@angular/core@4.3.6/bundles/core.umd.js:3913)
at ZoneDelegate.invokeTask (unpkg.com/zone.js@0.8.12/dist/zone.js:423)
at Zone.runTask (unpkg.com/zone.js@0.8.12/dist/zone.js:191)
at drainMicroTaskQueue (unpkg.com/zone.js@0.8.12/dist/zone.js:584)
at XMLHttpRequest.ZoneTask.invoke (unpkg.com/zone.js@0.8.12/dist/zone.js:490)
Expected behavior
I expect the resolve error to be logged / handled as any other error, so that we can send it to our error collector (Raygun).
Minimal reproduction of the problem with instructions
Example of correct error log: https://stackblitz.com/edit/angular-5cl2hn
Example of incorrect error log: https://stackblitz.com/edit/angular-n2gxqp
Environment
Angular version: tested on both Angular 4.4.4 as Angular 5.0-RC5
Occurs on any fresh CLI generated project.
the information is from angular/angular#19923
Regular errors, such as HTTP errors, are correctly be logged as
ERROR HttpErrorResponse
When an error occur in a resolve guard, I get a weird stack trace:
Expected behavior
I expect the resolve error to be logged / handled as any other error, so that we can send it to our error collector (Raygun).
Minimal reproduction of the problem with instructions
Example of correct error log: https://stackblitz.com/edit/angular-5cl2hn
Example of incorrect error log: https://stackblitz.com/edit/angular-n2gxqp
Environment
Angular version: tested on both Angular 4.4.4 as Angular 5.0-RC5
Occurs on any fresh CLI generated project.