Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Intercept Unhandled Rejection #6

Open
StabbarN opened this issue Jan 18, 2017 · 3 comments
Open

Intercept Unhandled Rejection #6

StabbarN opened this issue Jan 18, 2017 · 3 comments

Comments

@StabbarN
Copy link

The following code is inside a ng-click callback:

Promise.resolve().then(() => {
    return Promise.reject('Test reject outside angular')
})

Shouldn't this rejection be sent to Opbeat?

Rejections inside $q is sent to Opbeat, such as:

$q.resolve(Promise.resolve()).then(() => {
    return Promise.reject('Test reject inside angular')
})

We use angularjs 1.6.1, Opbeat Angular 3.9.1. and latest Babel (transpiled from es2015). Tested on latest Chrome and Firefox.

Web browser console prints:

Unhandled Promise rejection: Test reject outside angular ; Zone: opbeatRootZone ; Task: Promise.then ; Value: Test reject outside angular undefined
consoleError @ opbeat-angular.js:4519
_loop_1 @ opbeat-angular.js:4546
drainMicroTaskQueue @ opbeat-angular.js:4550
ZoneTask.invoke @ opbeat-angular.js:4472
opbeat-angular.js:4521 Error: Uncaught (in promise): Test reject outside angular
    at resolvePromise (opbeat-angular.js:4593)
    at resolvePromise (opbeat-angular.js:4578)
    at opbeat-angular.js:4626
    at ZoneDelegate.invokeTask (opbeat-angular.js:4400)
    at Object.onInvokeTask (opbeat-angular.js:3921)
    at ZoneDelegate.invokeTask (opbeat-angular.js:4399)
    at Zone.runTask (opbeat-angular.js:4300)
    at drainMicroTaskQueue (opbeat-angular.js:4532)
    at HTMLButtonElement.ZoneTask.invoke (opbeat-angular.js:4472)
@hmdhk
Copy link
Contributor

hmdhk commented Jan 18, 2017

@magnus-staberg ,

Thanks for reaching out.
I will make sure to bring it up in our planning session and update this issue as we progress.

Cheers

@morgs32
Copy link

morgs32 commented Feb 22, 2017

@jahtalab any update?

@hmdhk
Copy link
Contributor

hmdhk commented Feb 23, 2017

@morgs32 ,

Unfortunately no updates yet. We've been working on performance monitoring.

Cheers

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

No branches or pull requests

3 participants