Open rafaelbnp opened 6 years ago
I am experiencing something similar when trying to transition.retry()
a Transition that was triggered by a Route.refresh()
where queryParamsOnly: true
I guess this is somehow related to #16921
I find that Route#refresh()
produces a transition that cannot be retried if there are dynamic segments.
Here's my use case: https://ember-twiddle.com/6d2f981f6628a3260db8cafd3b3aac0a?openFiles=routes.flopping-route%5C.js%2C
@krukid - The issue you mention seems somewhat unrelated to the original one being discussed here (I think). Would you mind filing a new issue for that?
@rreckonerr recently fixed a somewhat related bug (where we would not thread through the original values when doing intermediate transitions), this seems somewhat related. I think the first step here would be to make a failing test case over in router.js...
Seems related to #10945.
My use case is: when a user tries to navigate with an expired token (by leaving the window open long enough) the API calls will fail with a unauthorized error. We added some logic to the Applications's error action to catch this type of error, re-authenticate the user and retry the transition after the authentication. The problem is that when I try to
transition.retry()
to a route with dynamic segments and query parameters withrefreshModel
, it will fail with the below error:If I set my query param to
refreshModel: false
, it works fine.Here's a reproducible twiddle: https://ember-twiddle.com/e25fc434b6e1c1627e553b8120203655?openFiles=routes.dynamic-segment.js%2C You can see the error when clicking on the 'Dynamic segment with query param' link. If you change the
refreshModel
tofalse
on /routes/dynamic-segment.js it works.Any help is appreciated. Thanks!