ember.js: Aborted transitions propagate error to Ember.RSVP.on('error',...)
As seen in this example, aborted transitions (through redirection or manual abortion) propagates a TransitionAborted error to the RSVP error handler while in 1.x it does not. Was this an intentional change or is the error an erroneous error?
About this issue
- Original URL
- State: open
- Created 9 years ago
- Reactions: 22
- Comments: 42 (11 by maintainers)
Commits related to this issue
- Propose a way to ignore current unwanted TransitionAborted raised by Ember 2.X This is a quick and dirty proposal to not log to New Relic errors that aren't desired. In the current context, there is ... — committed to mirego/ember-new-relic by Boubalou 8 years ago
- Hide Ember bug that shows transition error See https://github.com/emberjs/ember.js/issues/12505 — committed to internet4000/radio4000 by oskarrough 7 years ago
- Ignore TransitionAborted errors in Sentry emberjs/ember.js#12505 — committed to binoculars/ember-osf-web by binoculars 6 years ago
- Merge pull request #170 from binoculars/feature/ignore-transition-aborted-sentry Ignore TransitionAborted errors in Sentry emberjs/ember.js#12505 — committed to CenterForOpenScience/ember-osf-web by jamescdavis 6 years ago
- Patch ember.ts to ignore TransitionAborted errors See https://github.com/emberjs/ember.js/issues/12505 — committed to ServirIO/sentry-javascript by hectorh30 4 years ago
- Auto merge of #2871 - Turbo87:transition-abort, r=jtgeibel sentry: Ignore `TransitionAborted` errors According to https://github.com/emberjs/ember.js/issues/18416 it looks like changing query params... — committed to rust-lang/crates.io by bors 4 years ago
- Added TransitionAborted errors to Sentry's ignore list no issue - "unhandled" `TransitionAborted` errors almost always occur as part of expected application behaviour and were causing a lot of noise... — committed to TryGhost/Ghost by kevinansfield 2 years ago
- Added TransitionAborted errors to Sentry's ignore list no issue - "unhandled" `TransitionAborted` errors almost always occur as part of expected application behaviour and were causing a lot of noise... — committed to TryGhost/Ghost by kevinansfield 2 years ago
We experienced this same issue with our error tracking platform Sentry and solved it with a workaround seen in this commit. Maybe it helps someone 😃Edit: The Repository is no longer public.
I just merged a fix in
ember-cli-sentryhttps://github.com/damiencaselli/ember-cli-sentry/pull/67@Mifrill here you go:
There is a larger underlying issue here that goes beyond the commonly reported Sentry clutter. This seems to be also the root cause of https://github.com/ember-fastboot/ember-cli-fastboot/issues/202 as well which has a much greater impact as it can throw 500 errors or even crash fast boot server instances.
The inconsistent error handling and async handling causes a lot of differing behavior based on the types of promises and behavior of
beforeModelandafterModel.I went in and created a reproduction repository with the different pitfalls of how
beforeModelwill act differently based on various promise utilizations and implementations. https://github.com/rtablada/transition-aborted-exampleIn the example I take the basic docs redirect example and then do some fairly common changes to the method behavior or uses which drastically vary the behavior and response how
TransitionAbortedis surfaced.For best replication, you’ll need to pull that repo and run it locally since I currently don’t have an instance of the fast boot server running publicly.
@pixelhandler it’s still an issue - I can reproduce it on Ember 3.8.3. I think we should consider removing
inactivelabel, especially @robgarden provided repo for reproduction.@ezpuzz Tiered authorization (not authentication) is an area we always run into this. We store the transition for later so that we can provide good UX, and ease developer pain when implementing routes. We don’t know which routes need elevated permission until they are hit, in which case we abort and ask for elevated credentials before a retry. A general sweeping statement that in many cases it’s bad UX is a misnomer.
Also to note, this error is raised in an async block, not offloaded to rsvp.on(‘error’
For browser errors this seems like it is more of an issue of noise. However, with Fastboot this becomes a bit more difficult, since the throw will stop everything. I haven’t been able to find a way to catch that particular error, and I suspect the issue is that the exception is being thrown inside of a promise error handler.
Out of curiosity, what is the value in that particular throw? I’m wondering if it could either be removed, or if the error handler could be moved so that it could be overridden.
I stoped using Ember, so I cant confirm it still a issue.
Thanks @stravid, this is exactly what I needed. Months of this bug and I finally found this thread and your workaround after much Google-fu. 🙇
Any update on this? I experience it in Ember 2.2.0 too.