Skip to content

Commit

Permalink
Changed message to error_message, as that's what the API returns to m…
Browse files Browse the repository at this point in the history
…e. Example JSON:

{"code": 400, "error_type": "OAuthException", "error_message": "Redirect URI doesn't match original redirect URI"}
  • Loading branch information
pamelafox committed Apr 9, 2012
1 parent 7b7e3f4 commit 7ce1f49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion instagram/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def exchange_for_access_token(self, code=None, username=None, password=None, sco
response, content = http_object.request(url, method="POST", body=data)
parsed_content = simplejson.loads(content)
if int(response['status']) != 200:
raise OAuth2AuthExchangeError(parsed_content.get("message", ""))
raise OAuth2AuthExchangeError(parsed_content.get("error_message", ""))
return parsed_content['access_token'], parsed_content['user']


Expand Down

0 comments on commit 7ce1f49

Please sign in to comment.