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

chore: add custom strings to print response types and values if applicable #103

Merged
merged 3 commits into from
Dec 13, 2023

Conversation

anitarua
Copy link
Collaborator

@anitarua anitarua commented Dec 12, 2023

Addresses #84

By default, printing response classes that don't have associated values will print their class names:

success(Momento.CreateCacheSuccess)
alreadyExists(Momento.CreateCacheAlreadyExists)
miss(Momento.GetMiss)

Adding these custom strings allow for more informational prints about errors and classes with associated values:

success([ListCachesSuccess] Length of caches list: 4)
hit([GetHit] Value: xyz)
success([ListConcatenateFrontSuccess] List length post-concatenation: 2)
hit([ListFetchHit] List length: 2)
error([INVALID_ARGUMENT_ERROR] Invalid argument passed to Momento client: Invalid cache name)

@anitarua anitarua requested a review from pgautier404 December 12, 2023 22:32
Co-authored-by: pgautier404 <pgautier404@users.noreply.github.com>
@anitarua anitarua requested a review from pgautier404 December 13, 2023 01:08
pgautier404
pgautier404 previously approved these changes Dec 13, 2023
Copy link
Collaborator

@pgautier404 pgautier404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@anitarua anitarua requested a review from pgautier404 December 13, 2023 19:16
@anitarua anitarua merged commit 8c2895a into main Dec 13, 2023
4 checks passed
@anitarua anitarua deleted the print-responses branch December 13, 2023 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants