nats.go
nats.go copied to clipboard
UserCredentials should return error
Feature Request
UserCredentials call userFromFile and ignore error change UserCredentials to return error
Use Case:
Changed signature show the truth that the function can fail. and simply debug for such error.
Proposed Change:
change UserCredentials to return error
Who Benefits From The Change(s)?
Api will be more consistent, similar function NkeyOptionFromSeed already return error. Connection error will be easier to debug.
Alternative Approaches
Define new function instead of change api of old one. or Log error to not be hidden.