抛出其他Status Code

throw new \yii\web\HttpException(402); // 如果系统没有,可以通过HttpException自己写状态码
throw new \yii\web\HttpException(402,"message");