Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add error message

  • Loading branch information...
commit 8a4c62f2a2f3e10fb39ac317508052fb67b9241a 1 parent 8598cb7
@d1on authored
Showing with 12 additions and 2 deletions.
  1. +12 −2 facepy/signed_request.py
View
14 facepy/signed_request.py
@@ -117,7 +117,9 @@ def decode(string):
application = json.loads(psr['credits']['order_details']) if 'order_details' in psr['credits'] else None,
country = psr['credits'].get('country'),
created_time = psr['credits'].get('created_time'),
- updated_time = psr['credits'].get('updated_time')
+ updated_time = psr['credits'].get('updated_time'),
+ error_code = psr['credits'].get('error_code'),
+ error_message = psr['credits'].get('error_message'),
) if 'credits' in psr else None,
# Populate miscellaneous data
@@ -247,11 +249,17 @@ class Credits(object):
updated_time = None
"""An string describing the update time of the issue"""
+ error_code = None
+ """A Facebook error code"""
+
+ error_message = None
+ """The string describing the error"""
+
def __init__(self, buyer=None, receiver=None, order_id=None,
order_info=None, order_details=None, status=None,
id=None, fromm=None, to=None, amount=None,
application=None, country=None, created_time=None,
- updated_time=None):
+ updated_time=None, error_code=None, error_message=None):
self.buyer = buyer
self.receiver = receiver
self.order_id = order_id
@@ -266,6 +274,8 @@ def __init__(self, buyer=None, receiver=None, order_id=None,
self.country = country
self.created_time = created_time
self.updated_time = updated_time
+ self.error_code = error_code
+ self.error_message = error_message
class Page(object):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.