Error Substates


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: (output is given in the console)

Why does ApplicationRoute lose its initial model?


model is passed to setupController for ErrorRoute

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


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.