diff --git a/src/momento/internal/aio/_scs_data_client.py b/src/momento/internal/aio/_scs_data_client.py index 06ce938b..a83650b8 100644 --- a/src/momento/internal/aio/_scs_data_client.py +++ b/src/momento/internal/aio/_scs_data_client.py @@ -267,7 +267,7 @@ async def get(self, cache_name: str, key: TScalarKey) -> CacheGetResponse: else: raise UnknownException("Get responded with an unknown result") except Exception as e: - self._log_request_error("set_if_not_exists", e) + self._log_request_error("get", e) return CacheGet.Error(convert_error(e)) async def delete(self, cache_name: str, key: TScalarKey) -> CacheDeleteResponse: @@ -283,7 +283,7 @@ async def delete(self, cache_name: str, key: TScalarKey) -> CacheDeleteResponse: self._log_received_response("Delete", {"key": str(key)}) return CacheDelete.Success() except Exception as e: - self._log_request_error("set", e) + self._log_request_error("delete", e) return CacheDelete.Error(convert_error(e)) # DICTIONARY COLLECTION METHODS @@ -729,7 +729,7 @@ async def set_add_elements( self._log_received_response("SetAddElements", {"set_name": str(request.set_name)}) return CacheSetAddElements.Success() except Exception as e: - self._log_request_error("set_remove_elements", e) + self._log_request_error("set_add_elements", e) return CacheSetAddElements.Error(convert_error(e)) async def set_fetch( @@ -883,7 +883,7 @@ async def sorted_set_fetch_by_score( else: raise UnknownException(f"Unknown set field in response: {type}") except Exception as e: - self._log_request_error("sorted_set_fetch", e) + self._log_request_error("sorted_set_fetch_by_score", e) return CacheSortedSetFetch.Error(convert_error(e)) async def sorted_set_fetch_by_rank( @@ -935,7 +935,7 @@ async def sorted_set_fetch_by_rank( else: raise UnknownException(f"Unknown set field in response: {type}") except Exception as e: - self._log_request_error("sorted_set_fetch", e) + self._log_request_error("sorted_set_fetch_by_rank", e) return CacheSortedSetFetch.Error(convert_error(e)) async def sorted_set_get_scores( diff --git a/src/momento/internal/synchronous/_scs_data_client.py b/src/momento/internal/synchronous/_scs_data_client.py index 64efe67f..8cef0024 100644 --- a/src/momento/internal/synchronous/_scs_data_client.py +++ b/src/momento/internal/synchronous/_scs_data_client.py @@ -265,7 +265,7 @@ def get(self, cache_name: str, key: TScalarKey) -> CacheGetResponse: else: raise UnknownException("Get responded with an unknown result") except Exception as e: - self._log_request_error("set_if_not_exists", e) + self._log_request_error("get", e) return CacheGet.Error(convert_error(e)) def delete(self, cache_name: str, key: TScalarKey) -> CacheDeleteResponse: @@ -281,7 +281,7 @@ def delete(self, cache_name: str, key: TScalarKey) -> CacheDeleteResponse: self._log_received_response("Delete", {"key": str(key)}) return CacheDelete.Success() except Exception as e: - self._log_request_error("set", e) + self._log_request_error("delete", e) return CacheDelete.Error(convert_error(e)) # DICTIONARY COLLECTION METHODS @@ -727,7 +727,7 @@ def set_add_elements( self._log_received_response("SetAddElements", {"set_name": str(request.set_name)}) return CacheSetAddElements.Success() except Exception as e: - self._log_request_error("set_remove_elements", e) + self._log_request_error("set_add_elements", e) return CacheSetAddElements.Error(convert_error(e)) def set_fetch( @@ -881,7 +881,7 @@ def sorted_set_fetch_by_score( else: raise UnknownException(f"Unknown set field in response: {type}") except Exception as e: - self._log_request_error("sorted_set_fetch", e) + self._log_request_error("sorted_set_fetch_by_score", e) return CacheSortedSetFetch.Error(convert_error(e)) def sorted_set_fetch_by_rank( @@ -933,7 +933,7 @@ def sorted_set_fetch_by_rank( else: raise UnknownException(f"Unknown set field in response: {type}") except Exception as e: - self._log_request_error("sorted_set_fetch", e) + self._log_request_error("sorted_set_fetch_by_rank", e) return CacheSortedSetFetch.Error(convert_error(e)) def sorted_set_get_scores(