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

ObjectStore.list() should not raise NotFoundError if no objects found #586

Open
skewty opened this issue Jul 14, 2024 · 1 comment
Open
Assignees
Labels
defect Suspected defect such as a bug or regression

Comments

@skewty
Copy link

skewty commented Jul 14, 2024

Observed behavior

NotFoundError is raised. This exception is unexpected (not mentioned in docstring) and non-pythonic.

Expected behavior

Empty list is returned. This meets the contract of the docstring and method signature and is pythonic.

Server and client version

nats-py 2.8.0

nats-server 2.10.17

Host environment

No response

Steps to reproduce

No response

@skewty skewty added the defect Suspected defect such as a bug or regression label Jul 14, 2024
@caspervonb caspervonb self-assigned this Jul 14, 2024
@skewty
Copy link
Author

skewty commented Aug 2, 2024

@caspervonb the current behavior seems intentional. Would adding a raise_on_empty: bool = True kwarg be an acceptable "fix" as changing this would be a breaking change. Should this be deferred to a v3 release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

2 participants