diff --git a/core/configuration.md b/core/configuration.md index cfab99b2e34..a7be08eb722 100644 --- a/core/configuration.md +++ b/core/configuration.md @@ -392,9 +392,11 @@ default values: ```php [ AuthenticationException::class => 401, - AuthorizationException::class => 403 + AuthorizationException::class => 403, + SerializerExceptionInterface::class => 400, + InvalidArgumentException::class => 400, ], // The list of routes. diff --git a/core/errors.md b/core/errors.md index c77db00c53f..2e78bd3653a 100644 --- a/core/errors.md +++ b/core/errors.md @@ -62,6 +62,8 @@ And like this, if you are using API Platform with Laravel: 4. Similarly, check for `App\Contracts\Exceptions\HttpExceptionInterface`. 5. Use defaults for the following exceptions: - `Illuminate\Http\Exceptions\HttpResponseException` => 400 + - `Symfony\Component\Serializer\Exception\ExceptionInterface` => 400 + - `ApiPlatform\Metadata\Exception\InvalidArgumentException` => 400 - `ApiPlatform\Symfony\Validator\Exception\ValidationException` => 422 6. The status defined on an `ErrorResource` 7. Fallback to 500.