From 79571ca234d866b1bf50b9c638337590e2158c1d Mon Sep 17 00:00:00 2001 From: Pirmin Mattmann Date: Mon, 21 Oct 2024 22:53:05 +0200 Subject: [PATCH] set exception_to_status --- api/config/packages/api_platform.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/config/packages/api_platform.yaml b/api/config/packages/api_platform.yaml index e6a16a6af6..28980e4b83 100644 --- a/api/config/packages/api_platform.yaml +++ b/api/config/packages/api_platform.yaml @@ -42,3 +42,14 @@ api_platform: order: createTime: DESC keep_legacy_inflector: false + + # On API-Platform Update - test, if this config is still needed. + # See PR 5948: https://github.com/ecamp/ecamp3/pull/5948 + exception_to_status: + # Default + Symfony\Component\Serializer\Exception\ExceptionInterface: 400 + ApiPlatform\Metadata\Exception\InvalidArgumentException: 400 + ApiPlatform\ParameterValidator\Exception\ValidationExceptionInterface: 400 + Doctrine\ORM\OptimisticLockException: 409 + # Legacy + ApiPlatform\Exception\InvalidArgumentException: 400 \ No newline at end of file