Fix: correct usage of badRequestHttpException signature

This commit is contained in:
Julien Fastré 2023-04-24 15:50:08 +02:00
parent 01f2697b8d
commit 0c5a06c678
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

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