Bug #55618
Wrong HTTP status code for missing entities
Status: | Resolved | Start date: | 2014-02-03 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | Error | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | (any) |
Description
When an exception is thrown in PropertyMapper::convert()
it is always wrapped in a \TYPO3\Flow\Property\Exception
leading to the default exception handling which sets the status code of the HTTP response to 500.
At least in the case of a TargetNotFoundException
this should be a 404 status instead
Associated revisions
[!!!][BUGFIX] Return 404 status code for removed entities
With this change the status code for persisted entities that can't
be found is no longer ``500``.
Background:
When an exception is thrown in ``PropertyMapper::convert()`` it is
always wrapped in a ``\TYPO3\Flow\Property\Exception`` leading to the
default exception handling which sets the status code of the HTTP
response to 500.
This is a breaking change only in the case that one relied on the
(incorrect) behavior of returning a status code 500 for entities that
couldn't be found.
Change-Id: Ic37008975e9c58ec9bea9d4277ee4621e6de061b
Resolves: #55618
Releases: master
History
#1 Updated by Bastian Waidelich over 1 year ago
- Subject changed from Wrong HTTP status code for removed entities to Wrong HTTP status code for missing entities
#2 Updated by Gerrit Code Review over 1 year ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/27298
#3 Updated by Bastian Waidelich about 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset bdc1c89ad2d3cba08767d8d45b9bfb4dbe12ff45.