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

Return same not-found response from dh and non-dh clients #124

Merged
merged 1 commit into from
Sep 24, 2023

Conversation

gammazero
Copy link
Collaborator

@gammazero gammazero commented Sep 23, 2023

The Client and DHashClient need to return the same response when no results are found. A not-found response is indicated by an empty FindResponse and a nil error. A non-nil FindResponse is returned in order to preserve compatibility with existing clients that expect a non-nil value.

Fixes #53

@gammazero gammazero force-pushed the no-error-when-not-found branch 2 times, most recently from 6f95b62 to 4bf4348 Compare September 23, 2023 00:03
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (3bc33f6) 61.48% compared to head (8ba0037) 61.48%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #124   +/-   ##
=======================================
  Coverage   61.48%   61.48%           
=======================================
  Files          57       57           
  Lines        4913     4913           
=======================================
  Hits         3021     3021           
  Misses       1567     1567           
  Partials      325      325           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The Client and DHashClient need to return the same response when no results are found. Return empty response for not found to preserve compatability with clients that expect non-nil response.

Fixes #53
@gammazero gammazero force-pushed the no-error-when-not-found branch from dd4d4a6 to 8ba0037 Compare September 23, 2023 04:34
@gammazero gammazero requested a review from ischasny September 23, 2023 04:37
Copy link
Contributor

@ischasny ischasny left a comment

Choose a reason for hiding this comment

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

Looks good

@gammazero gammazero merged commit 93ca455 into main Sep 24, 2023
7 checks passed
@gammazero gammazero deleted the no-error-when-not-found branch September 24, 2023 19:40
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.

Double-hashed find client should implement find client interface
3 participants