From 9c948774e0260044c7fad052cc2da2963d3495cb Mon Sep 17 00:00:00 2001 From: andrey Date: Mon, 16 Aug 2021 15:59:56 +0300 Subject: [PATCH] response 400 --- frontend/modules/api/controllers/ProfileController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/modules/api/controllers/ProfileController.php b/frontend/modules/api/controllers/ProfileController.php index 5b471fc..3e9fac4 100644 --- a/frontend/modules/api/controllers/ProfileController.php +++ b/frontend/modules/api/controllers/ProfileController.php @@ -67,7 +67,8 @@ class ProfileController extends \yii\rest\Controller return ['status' => 'success']; } - return ['status' => 'error']; + \Yii::$app->response->statusCode = 400; + return ['status' => 'error', 'errors' => $model->errors]; } }