Skip to content

Commit

Permalink
Better explanation of implicit exception response status code
Browse files Browse the repository at this point in the history
  • Loading branch information
hvt authored and wouterj committed Sep 5, 2015
1 parent cf68425 commit 54f77d8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions reference/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,12 @@ and set a new ``Exception`` object, or do nothing::
response won't work. If you want to overwrite the status code (which you
should not without a good reason), set the ``X-Status-Code`` header::

$response = Response(
$response = new Response(
'Error',
404 // ignored,
array('X-Status-Code' => 200)
404, // this status code will be ignored
array(
'X-Status-Code' => 200 // this status code will actually be sent to the client
)
);

.. seealso::
Expand Down

0 comments on commit 54f77d8

Please sign in to comment.