Last active
September 16, 2015 16:55
-
-
Save filipeximenes/d67eb6e875ea6c3c34cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tapioca.exceptions import ClientError, ServerError | |
from my_wrapper import MyWrapper | |
api = MyWrapper() | |
try: | |
r = api.my_resource().post(data={'test': 'data'}) | |
except ClientError as e: | |
print('This is a client error with status code %s' % e.client().response().status_code) | |
except ServerError as e: | |
print('This is a server error with status code %s' % e.client().response().status_code) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment