Skip to content

Commit

Permalink
fix: typos in error logging (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaddingtonwhite authored Jun 27, 2023
1 parent 4700466 commit d8bef74
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/momento/internal/aio/_scs_data_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions src/momento/internal/synchronous/_scs_data_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit d8bef74

Please sign in to comment.