Skip to Content

Unable to identify NetworkError (code 0) in 1.38.7 (Older version 1.28.38 works)

Hello Experts,

I'm developing a mobile application in SAPUI5.

I need to check 'Network error' (no connection)
In SAPUI5 1.28.38 in the callback function of the attachRequestFailed function of the model I can get the statusCode parameter if the value is 0 it's a network error
The console in this case:
The following problem occurred: error - undefined,0,NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://<server>:<port>/testlogin/CheckLoginServlet'. ", source: https://<server>:<port>/sapui5_128/resources/sap-ui-core.js (88)

However in SAPUI5 1.38.7 this is the console:
"Uncaught TypeError: Cannot read property 'status' of undefined", source: https://<server>:<port>/sapui5_138/resources/sap/ui/core/library-preload.json/sap/ui/model/json/JSONModel.js (6)
And statusCode cannot be read (because exception occurs in SAP class).

Why the newer version doesn't have the 0 statusCode? and what is the best way to check if network connection available?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers