Skip to content

Commit

Permalink
chore: Also wrap non-Valinor mapping related exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-jan committed Oct 2, 2024
1 parent e69904d commit 38cc60c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Symfony/Request/ParamConverter/ValinorParamConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public function apply(Request $request, ParamConverter $configuration): bool
throw new JsonApiProblem(
'Invalid Request',
$this->debug ? $exception->getMessage() : 'Invalid data provided.',
422
422,
previous: $exception,
);
}

Expand All @@ -59,7 +60,7 @@ protected function getMapperBuilder(): MapperBuilder
{
$mapperBuilder = (new MapperBuilder())
->filterExceptions(
/** @psalm-pure */
/** @psalm-pure */
static function (\Throwable $exception) {
if ($exception instanceof InvalidArgumentException) {
/** @psalm-suppress ImpureMethodCall */
Expand Down

0 comments on commit 38cc60c

Please sign in to comment.