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

Default behavior when an entity is not found #510

Open
igamigo opened this issue Sep 2, 2024 · 1 comment
Open

Default behavior when an entity is not found #510

igamigo opened this issue Sep 2, 2024 · 1 comment

Comments

@igamigo
Copy link
Collaborator

igamigo commented Sep 2, 2024

For some store methods (and that are also surfaced in Client APIs), we are returning errors when a specific ID is not found. For example, searching for an account ID or a single Note ID results in an error.
A perhaps more usable alternative could be to return an Option<> that determines whether the entity was found or not.

@igamigo
Copy link
Collaborator Author

igamigo commented Sep 2, 2024

Related:

Also, the behavior of NoteFilter::Unique seems a bit unintuitive to me. Specifically, why not return an empty vector if the note with the specified ID could not be found? This would be much more consistent with the behavior of all other filters. Let's create an issue to discuss this.

Originally posted by @bobbinth in #508 (comment)

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

No branches or pull requests

1 participant