Open skewty opened 4 months ago
NotFoundError is raised. This exception is unexpected (not mentioned in docstring) and non-pythonic.
NotFoundError
Empty list is returned. This meets the contract of the docstring and method signature and is pythonic.
nats-py 2.8.0
nats-server 2.10.17
No response
@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?
raise_on_empty: bool = True
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