You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interfaces defined by the jetstream package (and possibly others though I haven't looked into them) do not document the typed errors that they may return. This makes it difficult to use the error types defined in this package to drive behavior after calling the interface methods.
For example, looking at the code I can see that the main implementation of KeyValue.Create() will return ErrKeyExists if the key exists at the time create is called. This should be documented as a requirement of the interface so consumers can rely on this error type being returned and handle it appropriately.
Expected behavior
Typed errors returned by any method should be documented.
Server and client version
github.com/nats-io/nats.go v1.31.0
Host environment
N/A
Steps to reproduce
N/A
The text was updated successfully, but these errors were encountered:
Observed behavior
The interfaces defined by the
jetstream
package (and possibly others though I haven't looked into them) do not document the typed errors that they may return. This makes it difficult to use the error types defined in this package to drive behavior after calling the interface methods.For example, looking at the code I can see that the main implementation of
KeyValue.Create()
will returnErrKeyExists
if the key exists at the time create is called. This should be documented as a requirement of the interface so consumers can rely on this error type being returned and handle it appropriately.Expected behavior
Typed errors returned by any method should be documented.
Server and client version
github.com/nats-io/nats.go v1.31.0
Host environment
N/A
Steps to reproduce
N/A
The text was updated successfully, but these errors were encountered: