Intercept Communication Erorrs?


I am using a web service which sometimes can’t handle the amount of requests (from different clients) which results in a “Communication Error”. I can’t change the web service so I want to at least notify the user that the server is overloaded at the moment and that he should try again later. Is it possible to generally intercept all Communication Errors and do custom actions afterwards?

Thanks for any hints!

One (simple) thing to do would be to customize the message that is shown when a commuication error occurs by “overriding” the static Application.getSystemMessages(). This does not allow you to run any code though.

If want do to something special in the case of a Communication Error you can extend ApplicationConnection and override showCommunicationError(String details). Note though that this is on the client side and you can probably not communicate reliably with the server as there is a problem in the communication (what originally caused showCommunicationError to be called)

Thanks, that helped! I use the simple thing at the moment… following function is now in my Application class:

public static SystemMessages getSystemMessages() {
		CustomizedSystemMessages systemMessages = new CustomizedSystemMessages();
		// ...
		return systemMessages;

Hi. I am getting communication error while focus or click the Vaadin ComboBox . How to resolve the issue and i have attached my applicaiton screenshot.