Fix: correct usage of badRequestHttpException signature

This commit is contained in:
2023-04-24 15:50:08 +02:00
parent 01f2697b8d
commit 0c5a06c678

View File

@@ -274,7 +274,7 @@ class ApiController extends AbstractCRUDController
$postedData = $this->getSerializer()->deserialize($request->getContent(), $postedDataType, $_format, $postedDataContext);
} catch (\Symfony\Component\Serializer\Exception\UnexpectedValueException $e) {
throw new BadRequestHttpException(sprintf('Unable to deserialize posted ' .
'data: %s', $e->getMessage()), 0, $e);
'data: %s', $e->getMessage()), $e, 0);
}
switch ($request->getMethod()) {