Skip to content

Commit

Permalink
minor #5669 Better explanation of implicit exception response status …
Browse files Browse the repository at this point in the history
…code (hvt)

This PR was squashed before being merged into the 2.3 branch (closes #5669).

Discussion
----------

Better explanation of implicit exception response status code

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets | none

Commits
-------

54f77d8 Better explanation of implicit exception response status code
  • Loading branch information
wouterj committed Sep 5, 2015
2 parents 3c0036e + 54f77d8 commit d64e993
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 d64e993

Please sign in to comment.