The route.connections logo is undefined, and rendering is on error

I want to make a server error message. I am creating a special route displaying the representation of the error message. At the same time, I do not want to redirect this route URL to be able to reload the current page. So I decided to use feature rendering in the application route.

// application/route.js
actions: {
  error: function(error, transition) {
    if (error.errors) {
      return this.render('server-error.internal');
    }
    return true;
  }
}

It works correctly when I redirect the error page from another application route that loads correctly. When I manually print the URL of the error page, I accept the error

Unable to read the "push" property from undefined

"connections". github, . .

ember-cli: 2.4.3

+4
1

, - . error event error substate. . . , .

error renderTemplate. URL, ( ) :

// app/pods/error/route.js
export default Ember.Route.extend({
  renderTemplate: function(controller, model) {
    const transition = this.get('router.router.activeTransition');
    const url = this.get("router").generate(transition.targetName);
    this.get("router").router.updateURL(url);

    if (model.errors) {
      if (is404Error(model.errors)) {
        return this.render('server-error.not-found');
      } else if (is500Error(model.errors)) {
        return this.render('server-error.maintenance');
      }
    }
    return true;
  }
});
0

All Articles