kevinohara80/nforce — pull request #35 by chrishic (2014-01-02 21:22:02+00:00)
Title: Guard against non-json error responses

Starting with v28.0 of the SF REST API call, `getIdentity()`, if an access token has expired, SF does not return an actual JSON error response as expected (i.e. an array of error hashes). Instead, it returns a one-line error string in the body along with HTTP code 403. This change handles this scenario, such that when bubbled up to the caller, the caller knows to refresh the token.