Skip to content

Commit aca9945

Browse files
alexndlmsoyuka
authored andcommitted
-refactoring
1 parent 83026bd commit aca9945

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/State/Provider/DeserializeProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
namespace ApiPlatform\State\Provider;
1515

16+
use ApiPlatform\Metadata\Exception\OperationNotFoundException;
1617
use ApiPlatform\Metadata\HttpOperation;
1718
use ApiPlatform\Metadata\Operation;
1819
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
@@ -128,7 +129,7 @@ private function normalizeExpectedTypes(?array $expectedTypes = null): array
128129
if (class_exists($expectedType) || interface_exists($expectedType)) {
129130
try {
130131
$normalizedType = $this->resourceMetadataCollectionFactory->create($expectedType)->getOperation()->getShortName();
131-
} catch (\Throwable) {
132+
} catch (OperationNotFoundException) {
132133
// Do nothing
133134
}
134135

0 commit comments

Comments
 (0)