ManKeer
How the server can notify the client that the subcription failed due to a specific error?
Based on the documentation, SubscriptionException will not notify the clients even if it was thrown, however, the light streamer client has onSubscribtionError method which will be called when the client is notified about the failure of the subscription.
I didn't figure out how can I notify the client.
Waiting your help.
Giuseppe Corti
There are methods of the MetadataProvider interface that are entitled to authorize the subscription which can return errors that will be communicated by the server to the client.
In particular notifyNewTables, getItems, and getSchema.
Once validated by the Metadata the subscription is considered appropriate and correct therefore an error in the subscribe is something unexpected and not pertaining to the client.
If you really want to communicate errors to the clients in this phase you have to do it applicatively, that is, do not throw the exception but send special updates with the errors.
Regards,
Giuseppe