Allow to customize the Scala client's behaviour on failure.

- Allow to override the logging message/method when the response is invalid/not found
- When looking for JSON, consider blank contents as none.
done

On Tue, Oct 7, 2014 at 12:15 PM, Lloyd <notifications@github.com> wrote:

> In
> scala-ws-client/src/main/scala/com/m3/octoparts/ws/AggregateResponseEnrichment.scala:
>
> > @@ -37,12 +38,9 @@ object AggregateResponseEnrichment {
> >       * @tparam A the result type, i.e. the type of the JSON-serialized object
> >       * @return the object, or None if it could not be found and deserialized for some reason.
> >       */
> > -    def getJsonPart[A: Reads](id: String): Option[A] = {
> > +    def getJsonPart[A: Reads](id: String, recoverWith: (String, Throwable) => Option[A] = warnFailure[A] _): Option[A] = {
>
>
>    1. Unsure if the Scaladocs for this method should be updated to have
>    this recoverWith param as well
>    2. Maybe add simple a test to make sure that the provided recover with
>    is used?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/m3dev/octoparts/pull/38/files#r18498899>.
>