Error Substates


#1

When an error occurs in a nested route, the thrown error bubbles up to parent routes until one of them catches it.
The root level that can handle an error is Application’s. However, the setupController hook of ApplicationRouteis triggered after transitioning from ErrorRoute with an undefined context.

Code example can be viewed here: http://jsbin.com/ucanam/2563/edit (output is given in the console)

Why does ApplicationRoute lose its initial model?


#2

model is passed to setupController for ErrorRoute

You can see this in my extended version of your JSBin.


#3

ErrorRoute's model is the error object, not Application's.
How can I still be able to use the model resolved by ApplicationRoute's model hook? Since it’s been reset after the ErrorRoute is called, further navigation in the app results in an undefined application model.