Skip to content
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

NATSTimeoutException when we supply a non existing or wrong cluster id #93

Closed
Amardaya opened this issue Feb 20, 2019 · 5 comments · Fixed by #111
Closed

NATSTimeoutException when we supply a non existing or wrong cluster id #93

Amardaya opened this issue Feb 20, 2019 · 5 comments · Fixed by #111

Comments

@Amardaya
Copy link

Hi,
not sure if i m going to get my answer as i m not seeing a lot of activities around Nats Client using .net,

while i m trying to use Nats streaming server i start getting a misleading exception ( NATSTimeoutException )

at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout)
at NATS.Client.Connection.request(String subject, Byte[] data, Int32 offset, Int32 count, Int32 timeout)

when i provided a wrong cluster id , is this the intent or just triggering the wrong exception
Thanks

@ThomasVestergaard
Copy link

ThomasVestergaard commented Feb 20, 2019

I have encountered this one as well and it can be somewhat difficult to track down if you are not aware of the importance of cluster id. However a NATSTimeoutException, IMO, is the correct exception. An error message saying that this could be because of the IP/Hostname, Port OR cluster id might help narrowing this down earlier.

@ColinSullivan1
Copy link
Member

This issue seems to be a common one. Would something like a ClusterUnavailableException with the cluster name in the message sound reasonable?

@Amardaya
Copy link
Author

thanks for your answers guys
yes it make more sense to have an exception that contain a cluster as we need to separate exception between nats streaming connection (IStanConnection) and nats connection (IConnection) because nats connection doesn't really care about the cluster ID
Thanks

@ColinSullivan1
Copy link
Member

Hi all, I created a PR for this, #111 , does this look like it'll help? After further thought, I didn't want to change the exception because that would be a breaking change in the API.

@Amardaya
Copy link
Author

yes it will diffenetly help and better than the previous exception
thanks Colin for this enhancement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants