You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trace.js:170 Transition No provider for UIView.PARENT_INJECT! #1-0: <- Rejected "Transition#1( 'welcome'{} -> 'mymessages'{} )", reason: Transition Rejection($id: 0 type: 2, message: The transition has been superseded by a different transition, detail: 'login'{})
hi @adamlubek sorry for the late (probably too late) response.
Every transition, once started, is either successful (meaning the destination state is active, etc) or it fails/errors. When a transition is redirected, the original transition is cancelled and a new one is started to the redirect target. Thus, the original transition has technically errorred. See this section of the Transition guide for more information.
If you want to filter specific types of errors, you can do so in your onError hook by checking the type of the TransitionRejection (see RejectType docs). For RejectType.SUPERSEDED, there is an additional redirected flag which tells you if the transition was superseded because of a redirect.
.onError({}, transition => {
const err = transition.error();
switch (err.type) {
case RejectType.ERROR:
// do error stuff
break;
case RejectType.SUPERSEDED:
case RejectType.IGNORED:
// ignore
break;
}
});
hey,
When running sample app I get Transition Rejection a lot and as a result $transitions.onError triggered all the time. Steps to reproduce:
Similar thing happens when refreshing page in the browser e.g.
Generally, just clicking through the pages or refreshing the page surely shouldn't cause rejections and triggering error handling?
The text was updated successfully, but these errors were encountered: