On Fri, Jun 14, 2013 at 09:09:33AM +0530, Hage Yaapa wrote: > What you are asking for is not recommended. Request should either be a > success or a failure.
I concur here.
Try to avoid 'warning' cases -- reduce the interface until there's only cases
you're willing to handle separated from cases you're not. It's that much more
surface area for the API, and that much harder to plumb together something that
interprets it well.
Try to take advantage of idempotency -- accept a repeated action as if it's the
first time. It makes building a robust system much easier ("I'm not sure that
worked. Send it again!")
Then when you have real errors, throw the best status code and most useful
diagnostics -- preferably in a consistent, easy to parse format -- and call it
a day.
If you need an "I know what I'm doing" flag, add it to a repeated request.
TL;DR. There are no non-fatal errors, just retriable ones and non-retriable.
Aria
pgpinkloUYkYv.pgp
Description: PGP signature
