providers: handle invalid responses
Merge pull request #8 from davidchambers/invalid-json

providers: handle invalid responses