don't retry on 4xx errors even if they have invalid json
do parse json, fix tests
Merge pull request #85 from ericcj/master

don't retry on 4xx errors even if they have invalid json