diff --git a/octodns_ns1/__init__.py b/octodns_ns1/__init__.py index 1ce529c..1c881c3 100644 --- a/octodns_ns1/__init__.py +++ b/octodns_ns1/__init__.py @@ -283,6 +283,15 @@ def _try(self, method, *args, **kwargs): ) sleep(period) tries -= 1 + except ResourceException as e: + self.log.exception( + "_try: method=%s, args=%s, response=%s, body=%s", + method.__name__, + str(args), + e.response, + e.body, + ) + raise class Ns1Provider(BaseProvider): diff --git a/tests/test_provider_ns1.py b/tests/test_provider_ns1.py index 5b70276..5a4ce17 100644 --- a/tests/test_provider_ns1.py +++ b/tests/test_provider_ns1.py @@ -273,6 +273,7 @@ def reset(): provider._client.reset_caches() zone_retrieve_mock.reset_mock() zone_retrieve_mock.side_effect = None + zone_retrieve_mock.__name__ = 'retrieve' record_retrieve_mock.reset_mock() record_retrieve_mock.side_effect = None @@ -470,7 +471,9 @@ def reset(): provider._client.reset_caches() record_retrieve_mock.reset_mock() zone_create_mock.reset_mock() + zone_create_mock.__name__ = 'create' zone_retrieve_mock.reset_mock() + zone_retrieve_mock.__name__ = 'retrieve' # Fails, general error reset()