we have a case where the Worklight Server's (v6.1.0.02-20150509) database was down, and so the server could not connect and so the hybrid app then presented the below dialog.
We did not provide this dialog and its content in the app, so this must come from the Worklight Client framework.
Since the phone is set to French, you see that there is some English/French mix in the text.
What we are wondering is whether there is a way to catch this?
There seems to be no callback and it seems the adapter call did not properly timeout and thus did not properly return an error to our code.
Also, why is the Worklight framework showing a visual error dialog? A framework should provide callbacks and hooks, and not visual UI that the app developers did not create.
Christian,
Using IBM Worklight Studio 6.1.0.02-20150608-1406 I followed these two scenarios:
Use
WL.Client.connect
fromwlCommonInit()
while the server is running but the MySQL database of the server (WRKLGHT) is shut downIn this scenario the
connect
failed and I reached itsonFailure
callback.Use
WL.Client.invokeProcedure
fromwlCommonInit()
(instead of theconnect
) while the server is running but the MySQL database server of the server (WRKLGHT) is shut down. The procedure calls a SQL adapter attempting to retrieve data from the same database server.In this scenario the adapter invocation failed and I reached its
onFailure
callback.So clearly what you are experiencing is not happening here using the latest build version I mentioned at the beginning.