A function to check connectivity to a gateway is sorely needed in PowerApps.
At the moment it is impossible to implement proper error handling when trying to connect to an on premesis data source. Connection.Connected merely checks internet connectivity, and Errors([Datasource]) only includes errors returned by the datasource itself, and so is empty when the data source is not reached.
Either a function to test the gateway connection, or an inclusion of "data source unreachable" in the errors table is desperately needed. Even a function to test if any error notifications were generated by the app would do.