In controllers\SiteController.php
change the code like this.
public function actions()
{
return [
'error' => [
'class' => 'yii\web\ErrorAction',
'layout' => 'error-layout', // the rendered layout
'view' => 'error-page' // the rendered view
],
...
];
}
```