pythonforfacebook/facebook-sdk — pull request #65 by moskytw (2013-01-24 11:44:15+00:00)
Title: fix two bugs of GraphAPIError

Hi there,

I fixed two bugs of GraphAPIError.

### Wrongly paring of error response

with the commit 0f28100.

Test:

from facebook import GraphAPI, GraphAPIError
from pprint import pprint

graph = GraphAPI(access_token='123')

try:
graph.get_object('me')
except GraphAPIError, e:
print 'e.type: %r' % e.type
print 'e.result:'
pprint(e.result)

Result before fixed:

e.type: ''
e.result:
{'error': {'code': 190,
'message': 'Invalid OAuth access token.',
'type': 'OAuthException'}}

Result after fixed:

e.type: 190
e.result:
{'error': {'code': 190,
'message': 'Invalid OAuth access token.',
'type': 'OAuthException'}}

### Wrong parameters for GraphAPIError

Please see the commit fffe690.