cancel
Showing results for 
Search instead for 
Did you mean: 

How to manage Http error messages in a Odata offline app?

Former Member
0 Kudos

Hello,

I am developing an hybrid application using Kapsel plugins (Logon and Odata-offline plugins) but I have a doubt with the second plugin specified, and the question is, how to manage error messages based in HTTP status code correctly? Because I am receiving a error code messages different to messages implemented from the Gateway, and it is filtering our custom messages.

For example and without explain technical aspects, I am receiving these messages (in different scenarios) from the SMP like:

[Log] An error occurred or user cancelled action: {"message":"[-10107] The update entity request failed because the provided entity does not exist."} (app.js, line 1)

[Log] An error occurred or user cancelled action: {"message":"[-10104] An error occurred while committing a database transaction.  Reason: 0 (OK)"} (app.js, line 1)

[-10047] An error occurred while setting a parameter with an BINARY value in a prepared statement

I am not backend developer, and I do not know in depth the meaning of these messages..

Any help about this?

Thank you in advance.

Óscar.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member197903
Participant
0 Kudos

Hello Oscar,

You find the similar issue posted on SCN https://scn.sap.com/thread/3766463

Regards,

VP

Former Member
0 Kudos

Yes, last error/log is related with the post, but the first and second log are very important to know why is happening and the reason is appearing and sending that message to front-end and here is the problem..

Thank you for your response.

david_brandow
Contributor
0 Kudos

The -10107 error is indicating that when the PUT/PATCH/DELETE request was sent to the OData backend, it responded with an HTTP_NOT_FOUND or HTTP_NO_CONTENT.  This means that the backend is indicating that it has never heard of the entity you are trying to modify/delete.

Without more details, its hard to diagnose the -10104 error off the top of my head.  As it says, its getting an error trying to commit to the database, but without more context, its hard to know why.

Similarly, the -10047 error is indicating that it was unable to bind a user-supplied BINARY value as a parameter in the prepared statement it is constructing for use with the local UltraLite database.  Are you on a recent SP of the SDK?