Am 06.03.2015 um 11:07 schrieb Juraci Paixão Kröhling
<jpkroehling(a)redhat.com>:
For scenarios where things were really expected to be there but
aren't, exceptions are fine. For scenarios where the user asked for
something that didn't exist, input checking and promptly returning a
404 makes more sense, IMO.
I fear that this will lead to pretty unreadable code with many blocks of
return Response.Builder.notFound(new StringEntity("this is my message
%s",bla)).type("application/json").build()
While we do (only) application/json right now, this will get more complex with more
(custom) media types.