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.
Actually, since `None` is of type `Option[Nothing]`, using a function literal here works fine :) Please consider it after all.