Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Throw a useful error when WebSockets are disabled on the server #3014

Closed
analogrelay opened this issue Sep 26, 2018 · 3 comments
Closed

Throw a useful error when WebSockets are disabled on the server #3014

analogrelay opened this issue Sep 26, 2018 · 3 comments
Assignees
Labels
client: Java PRI: 1 - Required Must be handled in a reasonable time type: Bug
Milestone

Comments

@analogrelay
Copy link
Contributor

Today the Java Client doesn't do anything with the negotiate payload other than handling redirects. The payload also contains a list of available transports though. Eventually the client will use this to do fallback, but since we only support WebSockets, it should at least check that list to see if WebSockets are available on the server and throw a useful error (The WebSocket transport is not available on the server) if it's not there.

@analogrelay analogrelay added this to the 2.2.0 milestone Sep 26, 2018
@analogrelay analogrelay added type: Bug PRI: 1 - Required Must be handled in a reasonable time labels Sep 26, 2018
@mikaelm12 mikaelm12 self-assigned this Sep 26, 2018
@mikaelm12
Copy link
Contributor

Well we actually do use the negotiate payload to indicate to the user if there were no compatible transports

if (!negotiateResponse.getAvailableTransports().contains("WebSockets")) {
throw new HubException("There were no compatible transports on the server.");
}

@mikaelm12
Copy link
Contributor

We should add logging though.

@analogrelay
Copy link
Contributor Author

Wow, I completely missed that :). Good catch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client: Java PRI: 1 - Required Must be handled in a reasonable time type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants