You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@abdera.apache.org by Brian Moseley <bc...@osafoundation.org> on 2007/11/01 18:17:36 UTC

Re: In examples, 404 etc should be HttpServletResponse.SC_NOT_FOUND, etc

On 11/1/07, Neale <ne...@nealeupstone.com> wrote:

> For example, it's much easier to ensure we're handing errors correctly
> when the code we've used as our basis reads:
>             return new
> EmptyResponseContext(HttpServletResponse.SC_NOT_FOUND);
> instead of
>             return new EmptyResponseContext(404);

disagree. i much prefer the brevity of the numeric codes. they are
extremely well known; there's no excuse for misinterpreting a 404
response code. the argument for misinterpretation is slightly stronger
for less well known ones like say 422 and 423, but that's such a small
set that it's trivially learned.