Hi

> Am 12.11.2014 um 14:45 schrieb Bertrand Delacretaz <bdelacre...@apache.org>:
> 
> Hi Felix,
> 
> On Wed, Nov 12, 2014 at 2:24 PM, Felix Meschberger <fmesc...@adobe.com> wrote:
>> Consider this case:
>> * Client browses non-existing /a/b/xyz.html
>> * Not found, hence 404
>> * 404 handler fails due to some bad programming
>> * client gets 500
> 
>> I don’t think that is ok...
> 
> I understand your point but what would you consider ok then?

As I said: log the error handler failure but still send the original error to 
the client. To the client it is better to get a not-so-nice-but-correct 
response than to get a confusing response.

> 
> The error handler failing is a somewhat catastrophic situation, which
> IMO deserves a 500 status.

Yes, but ...
> 
> If we return 404 a monitoring system might not notice the problem.

.. whom are you sending the error message to ? The monitoring system or the 
client browsing the server ? The client is not interested in seeing a failing 
system. The client is interested in a direct response to his/her actions. Hence 
404 is the right reaction to the not-found-situation.

The failing error handler is an internal implementation detail and must not be 
exposed to the client.

But yes, I agree, we have to record the failure. This is done in the error log 
and the monitoring system is primarily looking at the error log not at the 
client response.

Regards
Felix

> 
> -Bertrand

Reply via email to