emberjs / emberjs/ember.js

[Bug] error substate is not transitioned to for application route model errors

Open
#19,592 1 comment 0 reactions 0 assignees View on GitHub
Routing
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

### 🐞 Describe the Bug
if an error occurs in beforeModel() or model() of the application route, a blank page is displayed -- nothing is rendered

### 🔬 Minimal Reproduction

https://ember-twiddle.com/54e1863b611ea408f9d0852b045f76b4/ce6b5ff675b10b12c7f015350ffcce8801094397

### 😕 Actual Behavior
a blank page is displayed -- nothing is rendered

### 🤔 Expected Behavior
the error substate should load / be displayed

### 🌍 Environment

- Ember: - 3.4, 3.18, 3.26 -- probably other versions as well

### workaround
the workaround is simple... just add the action to manually handle it, but really seems like we should not have to do this.

#### modern workaround
```js
@action
error(error) {
this.intermediateTransitionTo('error', error);
return true;
}
```

#### classic workaround
```js
actions: {
error(error) {
this.intermediateTransitionTo('error', error);
return true;
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.