public function init()
{
\Yii::$app->errorHandler->errorAction = '/admin/default/error';
throw new \yii\web\ForbiddenHttpException();
}
Yii::$app->errorHandler->errorAction = 'admin/default/error';
public function actions()
{
return [
'error' => [
'class' => 'yii\web\ErrorAction'
]
];
}