We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afe01f1 commit 3e700d1Copy full SHA for 3e700d1
Controller.php
@@ -38,14 +38,12 @@ public function behaviors()
38
];
39
}
40
41
- public function beforeAction($action)
+ public function init()
42
{
43
- if ($action == 'index') {
44
- // Replace error handler, so error response is a correct JSON-RPC one
45
- Yii::$app->set('errorHandler', ['class' => ErrorHandler::className()]);
46
- }
+ Yii::$app->set('errorHandler', ['class' => ErrorHandler::className()]);
+ Yii::$app->getErrorHandler()->register();
47
48
- return true;
+ parent::init();
49
50
51
0 commit comments