Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: typos in error logging #350

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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