diff --git a/open_facebook/api.py b/open_facebook/api.py index ac4b2f78..d0d593b0 100644 --- a/open_facebook/api.py +++ b/open_facebook/api.py @@ -236,7 +236,7 @@ def _request(cls, url, post_data=None, timeout=REQUEST_TIMEOUT, if parsed_response and isinstance(parsed_response, dict): # of course we have two different syntaxes if parsed_response.get('error'): - cls.raise_error(parsed_response['error']['type'], + cls.raise_error(parsed_response['error'].get('type', 'no-type-defined'), parsed_response['error']['message'], parsed_response['error'].get('code')) elif parsed_response.get('error_code'):