diff --git a/mailchimp/chimpy/chimpy.py b/mailchimp/chimpy/chimpy.py index be48db3..8e3f8b2 100644 --- a/mailchimp/chimpy/chimpy.py +++ b/mailchimp/chimpy/chimpy.py @@ -58,7 +58,7 @@ def _rpc(self, method, **params): try: if 'error' in result: - raise ChimpyException("%s:\n%s" % (result['error'], params)) + raise ChimpyException("%s:\n%s" % (result['error'], params), result['code']) except TypeError: # thrown when results is not iterable (eg bool) pass