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
In NATS client packages however, there doesn't seem to be a complete list of error codes that may be returned from nats-server.
Without these constants, clients interested in detecting specific server-side error conditions must hard-code a subset of errors.json into their application.
Background
The nats-server package maintains a list of possible error codes at https://github.com/nats-io/nats-server/blob/main/server/errors.json.
The elements of this JSON listing appear to be ErrorsData structures which feed a code generator to produce go-native symbolic constants at https://github.com/nats-io/nats-server/blob/main/server/jetstream_errors_generated.go.
In NATS client packages however, there doesn't seem to be a complete list of error codes that may be returned from nats-server.
Without these constants, clients interested in detecting specific server-side error conditions must hard-code a subset of errors.json into their application.
Proposed change
Generate symbolic constants for NATS client libraries from the NATS server errors listing at error codes at https://github.com/nats-io/nats-server/blob/main/server/errors.json
Use case
Clients interested in detecting specific server-side error conditions can match error codes by named symbolic constants without first duplicating the information in https://github.com/nats-io/nats-server/blob/main/server/errors.json.
The text was updated successfully, but these errors were encountered: