Instagram/instagram-ruby-gem — pull request #70 by philnash (2013-05-03 10:47:01+00:00)
Title: Catches 502 and 504 errors.

On occasion I have experienced `Faraday::Error::ParsingError` errors from the
gem because they are not caught in the HTTP Exception middleware. They then
fall through to the JSON parser, but since it is returning HTML from nginx
the parser throws an error instead.

I have added the extra errors and tests that include the HTML returned to
ensure that the middleware catches the errors before the JSON parser sees
them.