File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,13 @@ errors:
73
73
api_platform :
74
74
# ...
75
75
exception_to_status :
76
- # The 2 following handlers are registered by default, keep those lines to prevent unexpected side effects
76
+ # The 4 following handlers are registered by default, keep those lines to prevent unexpected side effects
77
77
Symfony\Component\Serializer\Exception\ExceptionInterface : 400 # Use a raw status code (recommended)
78
78
ApiPlatform\Core\Exception\InvalidArgumentException : ' HTTP_BAD_REQUEST' # Or a `Symfony\Component\HttpFoundation\Response`'s constant
79
+ ApiPlatform\Core\Exception\FilterValidationException : 400
80
+ Doctrine\ORM\OptimisticLockException : 409
79
81
82
+ # Custom mapping
80
83
App\Exception\ProductNotFoundException : 404 # Here is the handler for our custom exception
81
84
` ` `
82
85
You can’t perform that action at this time.
0 commit comments