[Hawkular-dev] [metrics] Consistent error replies from REST API

Thomas Segismont tsegismo at redhat.com
Fri Mar 6 05:17:34 EST 2015


Le 06/03/2015 11:07, Juraci Paixão Kröhling a écrit :
> I think we should be a bit careful with blindly throwing exceptions
> and mapping them to responses. Exceptions are more expensive than just
> checking for an object's existence and, for a public service (SaaS),
> this could be abused.
>
> 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.

+1


More information about the hawkular-dev mailing list