Create Record - Once it fails, can't have it working again

Hello All,

I have an app that I’m trying to failproof - With a backend API to a HANA Cloud on the SAP BTP (using destinations), I want to warn users in case a record creation failed and let them fix whatever needs to be, and then to continue the process.
As I am creating record and inserting data with a primary key, an easy way to raise an error, is to try to create an already existing primary key. This works, I intercept the error and have an alert.

Unfortunately, once I have failed the “create record”, even if I fix the primary key and input a non existent primary key, the “create record” will now always fail.
I need to restart the app to have it functionning again.

image

Any idea how to solve this?
Thank you very much,

R.

For anyone having the same issue and not understanding why…
To simulate an error, I had created an App variable (number) for my primary key and used an input text to modify it. When modifying the primary key to simulate an error, although the App variable was a number, as it was input with a text field, it was not cast as in integer, when the API call was made it was sent as a text, generating an error.
Using INTERGER(App.Variable_Name) was the solution to solve the issue.
Sorry for the bother.