Skip to content

Commit

Permalink
improved exception controller docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lsmith77 committed Feb 16, 2015
1 parent bc6fdd8 commit fdd21c4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Resources/doc/4-exception-controller-support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,21 @@ mapping, you can do this in your controller:
}
}
In order to make the serialization format of exceptions customizable it is possible to
configure a ``exception_handler``. Users of JMS serializer can further customize the output
by setting a custom ``exception_wrapper_handler``.

.. code-block:: yaml
# app/config/config.yml
fos_rest:
service:
exception_handler: fos_rest.view.exception_wrapper_handler
view:
# only relevant when using the JMS serializer for serialization
exception_wrapper_handler: null
See `this example configuration`_ for more details.

That was it!
Expand Down

0 comments on commit fdd21c4

Please sign in to comment.