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.