Add custom logger support. Refactor response error handling. Clean code to follow reek style guide.

I assume `original_object` here is the raw JSON response? maybe we can find a better name for this?