It's not clear how a subscribe() call is supposed to detect if the initial subscription failed (could be invalid syntax, or just a subscription mode the server doesn't support)?
The specific server I'm contacting just seems to silently ignore such subscriptions responds with a status 200 and a graphql-style error body for subscriptions it doesn't understand or support. Your client I guess kinda just ignores that, as nothing shows up to the sink handlers for the SSE stream (error, etc).
What should the server and/or this client library actually be doing to help me determine that the initial subscription didn't work? Is the SSE server supposed to return a 4xx or 5xx status code in this case? Or...?
And if there's an error in establishing the subscription, is the error() handler of the sink the appropriate place that should be notified? or would that go to onMessage() of the client instance?
It's not clear how a
subscribe()call is supposed to detect if the initial subscription failed (could be invalid syntax, or just a subscription mode the server doesn't support)?The specific server I'm contacting
just seems to silently ignore such subscriptionsresponds with a status 200 and a graphql-style error body for subscriptions it doesn't understand or support. Your client I guess kinda just ignores that, as nothing shows up to the sink handlers for the SSE stream (error, etc).What should the server and/or this client library actually be doing to help me determine that the initial subscription didn't work? Is the SSE server supposed to return a 4xx or 5xx status code in this case? Or...?
And if there's an error in establishing the subscription, is the
error()handler of the sink the appropriate place that should be notified? or would that go toonMessage()of the client instance?