adding error handling for api response
Merge pull request #2 from bureado/master

adding error handling for api response