-
Notifications
You must be signed in to change notification settings - Fork 116
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
Real error messages for stan.Connect() function #143
Comments
The What's missing is some documentation ;-) |
@kozlovic The discussed problem here is that nats-streaming reraises errors from an underlying call instead of interpreting, handling and raising appropriately interpreted errors. This can't be fixed with documentation. ;-) And if you really want to discuss the example by itself, okay, we can do that. The server is there, it responds with So, please reopen the issue. |
hi @erikbgithub, since the error at |
@erikbgithub The code you are pointing to is when the Streaming library creates the low level NATS connection. The NATS Connect call can fail for various reasons: no server running, an authorization problem, maybe a malformed URL, etc.. At the Streaming library level, it is impossible to get more information that what is returned by NATS. I am not sure why you are referring to |
As far as I can see with my limited go skills, the
stan.Connect()
just reraises errors from its underlying call, instead of reinterpreting them according to its context.It would be nice if it could give more interesting error messages to the users, e.g. if it receives a
INFO
block from the server, it can evaluate things like server version instead of just raising atimeout
error. Or if it can't read it, it can raise an error likegot INFO block but can't read it: <info output printed>
.This can save hours to users trying to debug things, since for instance on a timeout error one first expects that there's a network or DNS problem, and not that server and client just have different versions and therefore can't talk to each other.
The text was updated successfully, but these errors were encountered: