{"push_id":802252229,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"9a8738084ffdb6d09294c994b5701d8b9dd2281b","before":"54b438d1c5252325ff6f456a0b3be2bbf343d7af","commits":[{"sha":"e80a3fbdfbe2b85a6397c930f7d43ad31529c2d7","author":{"email":"3b9de09f2ff76afe9f0ad4fcae4ff68f52ec7fc4@2suggestions.com.au","name":"Nicholas Firth-McCoy"},"message":"Fix jQuery XHR JSON error handling\n\nAnnoyingly, jQuery doesn't parse the response as JSON if the status code\nis an error (http://stackoverflow.com/q/12310702/117104), even though\nthe server response's Content-Type is correctly set to application/json.\nSo in our XHR error handlers, xhr.responseJSON was always undefined.\n\nManually parse the responseText as JSON using jQuery.parseJSON().\n\nNote that this won't behave correctly if the server doesn't return JSON\n(eg. if there's a 500 error for some reason and it returns an HTML error\npage or something, or there's a 404 and it renders 'nothing').It would\nbe good to handle those cases. I think we'd want to DRY up the error\nhandlers first though as it's a bit verbose to handle all these cases\ncorrectly.","distinct":true,"url":"https://api.github.com/repos/peterkeen/payola/commits/e80a3fbdfbe2b85a6397c930f7d43ad31529c2d7"},{"sha":"9a8738084ffdb6d09294c994b5701d8b9dd2281b","author":{"email":"3e06abddbe0ba7361c64c7c01ec995fd664c12ba@bugsplat.info","name":"Pete Keen"},"message":"Merge pull request #159 from nfm/fix-jquery-xhr-json-error-handling\n\nFix jQuery XHR JSON error handling","distinct":true,"url":"https://api.github.com/repos/peterkeen/payola/commits/9a8738084ffdb6d09294c994b5701d8b9dd2281b"}]}