replace BadRequestException by BadRequestHttpException

This commit is contained in:
2022-04-27 14:30:50 +02:00
parent f14c915502
commit 48daed26f9
9 changed files with 25 additions and 27 deletions

View File

@@ -21,9 +21,9 @@ use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Validator\ConstraintViolationInterface;
@@ -255,7 +255,7 @@ class AccompanyingCourseController extends Controller
$personIds = $request->query->get('person_id');
if (false === is_array($personIds)) {
throw new BadRequestException('person_id parameter should be an array');
throw new BadRequestHttpException('person_id parameter should be an array');
}
foreach ($personIds as $personId) {