Search code examples
genexusgenexus-sd

Error Management in Genexus SD


I am testing GX24 Android App, and have some questions related to how errors are managed:

  • When the App can't connect to server we can see a nice managed message with an image, instead of the ordinary "Not connected" or "Timeout" blank panel. How can I customize my own error panel?

enter image description here

  • When the App started for the first time, It took some 3 to 4 minutes retrieving data. I am used to "timeout" errors for such time demanding server-side operations (more than one minute). How can I "avoid" them?

Thanks


Solution

  • 1) You can check the network connection's status by using the Network API external object:

    &IsConnected = NetWorkAPI.IsServerAvailable()
    if &isConnected
        ...
    else
        NotConnectedSDPanel()
    endif
    

    2) Regarding the timeout, there is currently no way to configure it in your application. However, the Synchronization.Receive method is special in two ways:

    1. It returns the synchronization data as a stream, so it only needs to start writing the response in less than a minute, but it can take longer to send all the information.
    2. In iOS it has a timeout of ten minutes instead of one, as a normal procedure would, so the server can take longer to start responding. Not so in Android where the timeout is the one minute default.