Basic error handling if curl fails or decoded response is not an object
TODO: Check response header
Adds error handling and messaging
Merge pull request #1 from betweenbrain/error_handling

Error handling