diff --git a/tfs/connection.py b/tfs/connection.py index d4287ea..902604e 100644 --- a/tfs/connection.py +++ b/tfs/connection.py @@ -516,7 +516,7 @@ def __send_request(self, method, uri, data, headers=None, payload=None, underPro try: result = response.json() - if response.status_code != 200: + if response.status_code not in (200, 201, 202): raise TFSClientError('TFS API returned HTTP %s (%s)' % ( response.status_code, result['error'] if 'error' in result else response.reason)) return result