cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Network related errors for OData calls

sainithesh21
Active Participant
0 Kudos

Hi Everyone,

Can anyone share me where I can find all the network related errors/error codes or how can I handle network related issue for Odata Offlne/Online requests in Android and iOS Platform.

As per my project requirement, need to handle connectivity errors during Offline store flush/refresh and along with OData call during the online.

I am getting ERR_INTERNET_DISCONNECTED, CONNECTION_ABORTED, etc are consoled in console. How can I handle these network errors.

Right now we are handling using error code

  1. [10204] Communication with the server failed with status code - com.sap.smp.client.odata.exception.ODataNetworkException: Unknown network error occured
  2. com.sap.smp.client.odata.offline.common.OfflineStoreException: [-10205] Failed to establish a socket connection to the server
  3. [-10161] Another thread is already flushing the request queue.

Thanks in advance

Sai Nithesh

Accepted Solutions (1)

Accepted Solutions (1)

david_brandow
Contributor
0 Kudos

The error codes I suspect you are interested in are: -10180 (COMMUNICATION_ERROR), -10204 (SYNC_FAILED_BAD_STATUS_CODE), -10205 (SYNC_FAILED_SOCKET_CONNECT), -10206 (SYNC_FAILED_INVALID_CHARACTER), -10207 (SYNC_FAILED_AUTH_REQUIRED), -10208 (SYNC_FAILED_HOST_NOT_FOUND), -10210 (SYNC_FAILED_SERVER_ERROR), -10288 (SYNC_FAILED_BAD_STATUS_CODE_RETRY), and -10292 (FAILED_TO_CONNECT_TO_SERVER).

Answers (4)

Answers (4)

sainithesh21
Active Participant
0 Kudos

Thanks David for your response. The solution provided by you is very helpful. Can you please share the reference link.

AbhishekSharma
Active Contributor
0 Kudos

Hi SaiNithesh Gajula,

Please visit below location to have all possible HTTP Errors that could raise.

https://httpstatuses.com/

Hope this helps..

Thanks-

Abhishek

sainithesh21
Active Participant
0 Kudos

Thanks Sami for your immediate response.

Currently I am working on Offline Hybrid Application using Kapsel Plugins(version 3.14.7), Cordova plugins and SAP Cloud Platform for Android & iOS the platforms.

Need help in :

  1. When the application is sync(flush or refresh) state, if the network disconnects suddenly it is throwing an error messages with different error codes like [-10204], [-10205], [-10161] in the console. I need help in getting all error codes, so that I can display the error message/info accordingly to the user.
  2. When I trigger the OData call, before I get the response if the network fails, exceptions/error was not throwing to the errorcalback function. Couldn't able to get proper response, can able to see error messages like ERR_INTERNET_DISCONNECTED, CONNECTION_ABORTED in console. Need help in handling these exceptions.
SamiLechner
Advisor
Advisor
0 Kudos

Hi

did you have a look at the code examples https://developers.sap.com/tutorial-navigator/mobile-interactive-tutorials/offline/native-ios/basic....

Please be more specific about the setup and where you are experience the problem. Than we can help you out.

Sami