Route Recognizer - Add route name in error message when missing params
- Dominant language
- TypeScript
- Stars
- 22.6k
- Forks
- 4.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 15
Description
As a developer when I try to transition using the controller.transitionToRoute('routeName', model) method, I get an error thrown in the console with no indication of the route name. It appears that in my case when I request a transition to 'customer', it intends to redirect into the 'customer.index' sub-route and it is missing a parameter.
It would be nice to have the route name shown in the error.
ember-metal.js:3992 Error: You must provide param `customer_id` to `generate`.
at getParam (route-recognizer.js:136)
at Array.generate.(/debug/anonymous function) (/assets/vendor.js:65944:21)
at RouteRecognizer.generate$1 [as generate] (route-recognizer.js:545)
at updateURL (router.js:1957)
at router.js:1466
at tryCatcher (rsvp.js:215)
at invokeCallback (rsvp.js:393)
at rsvp.js:457
at rsvp.js:14
at invoke (backburner.js:274)
defaultDispatch @ember-metal.js:3992
dispatchError @ember-metal.js:3973
onerrorDefault @rsvp.js:23
trigger @rsvp.js:75
(anonymous) @rsvp.js:906
invoke @backburner.js:274
flush @backburner.js:153
flush @backburner.js:345
end @backburner.js:455
run @backburner.js:539
join @backburner.js:546
run.join @ember-metal.js:4398
(anonymous) @has_element.js:18
exports.flaggedInstrument @ember-metal.js:3792
handleEvent @has_element.js:17
exports.default._emberMetal.Mixin.create._Mixin$create.handleEvent @view_support.js:177
_bubbleEvent @event_dispatcher.js:277
(anonymous) @event_dispatcher.js:211
dispatch @jquery.js:5183
elemData.handle @jquery.js:4991
"ember-cli": "~2.16.2"
Contributor guide
Assessment
This issue has not been assessed yet.