[TYPO3-core] RFC #????:
Oliver Hader
oliver at typo3.org
Fri Jul 10 11:42:55 CEST 2009
Hi Masi,
Martin Kutschker schrieb:
> Hi!
>
> This is a patch request.
>
> Branch: trunk
>
> Problem: When an AJAX call fails the error is reported with XML but
> without setting a different HTTP status. This makes it hard for the
> calling client code to detect the error condition.
>
> Solution: Send the HTTP status 500 when an error occured.
>
> Masi
>
> PS: Without this change ExtJS would wait forever when TYPO3 sent an XML
> error message instead of a valid JSON response.
But then we should consider sending error messages as JSON response as
well. However, a HTTP 500 error code means the following:
| The server encountered an unexpected condition which prevented it from
| fulfilling the request.
The request was fulfilled but a misbehaviour was encountered during
runtime. A 500 error code should be used only when something crashed or
whatever - which is not the case here.
However, I'd be fine with using a HTTP header like
| X-TYPO3-Error: 550 The given command could not be processed
olly
--
Oliver Hader
TYPO3 Release Manager 4.3
More information about the TYPO3-team-core
mailing list