diff --git a/ldclient/impl/datasource/polling.py b/ldclient/impl/datasource/polling.py index d6c22dc8..3392594c 100644 --- a/ldclient/impl/datasource/polling.py +++ b/ldclient/impl/datasource/polling.py @@ -99,4 +99,4 @@ def _poll(self): log.exception('Error: Exception encountered when updating flags. %s' % e) if self._data_source_update_sink is not None: - self._data_source_update_sink.update_status(DataSourceState.INTERRUPTED, DataSourceErrorInfo(DataSourceErrorKind.UNKNOWN, 0, time.time, str(e))) + self._data_source_update_sink.update_status(DataSourceState.INTERRUPTED, DataSourceErrorInfo(DataSourceErrorKind.UNKNOWN, 0, time.time(), str(e))) diff --git a/ldclient/impl/datasource/status.py b/ldclient/impl/datasource/status.py index c9813e04..f59fd49c 100644 --- a/ldclient/impl/datasource/status.py +++ b/ldclient/impl/datasource/status.py @@ -55,8 +55,8 @@ def init_store(): def upsert(self, kind: VersionedDataKind, item: dict): self.__monitor_store_update(lambda: self.__store.upsert(kind, item)) - # TODO(sc-212471): We only want to do this if the store successfully - # updates the record. + # TODO(SDK-62): We only want to do this if the store successfully wrote the record, + # which requires upsert to return a bool result (breaking change). key = item.get('key', '') self.__update_dependency_for_single_item(kind, key, item) diff --git a/ldclient/impl/datasourcev2/polling.py b/ldclient/impl/datasourcev2/polling.py index 326a3e2b..c10b0fcd 100644 --- a/ldclient/impl/datasourcev2/polling.py +++ b/ldclient/impl/datasourcev2/polling.py @@ -303,7 +303,7 @@ def fetch(self, selector: Optional[Selector]) -> PollingResult: if response.status >= 400: return _Fail( - f"HTTP error {response}", UnsuccessfulResponseException(response.status), + f"HTTP error {response.status}", UnsuccessfulResponseException(response.status), headers=headers, ) @@ -531,7 +531,7 @@ def fetch(self, selector: Optional[Selector]) -> PollingResult: headers = response.headers if response.status >= 400: return _Fail( - f"HTTP error {response}", UnsuccessfulResponseException(response.status), + f"HTTP error {response.status}", UnsuccessfulResponseException(response.status), headers=headers )