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.
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.