From 91acc29611efbb6dd036f4779557155c1915e775 Mon Sep 17 00:00:00 2001 From: abluchet Date: Fri, 14 Oct 2016 09:25:52 +0200 Subject: [PATCH] document https://github.com/api-platform/core/pull/797 --- core/configuration.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/configuration.md b/core/configuration.md index 95b8a381c87..98130ce06b3 100644 --- a/core/configuration.md +++ b/core/configuration.md @@ -28,6 +28,12 @@ api_platform: # Enable the Nelmio Api doc integration. enable_nelmio_api_doc: false + + # Map exceptions to HTTP status codes + exception_to_status: + Symfony\Component\Serializer\Exception\ExceptionInterface: 400 # with a status code + ApiPlatform\Core\Exception\InvalidArgumentException: 'HTTP_BAD_REQUEST' # or with a constant defined in the 'Symfony\Component\HttpFoundation\Response' class + collection: # The default order of results.