Hi,
I get data from an API and show it in a table. I have another api to delete and another for put, post,…
for example the API delete Endpoint gives me Validation messages in the response body which I want to display the user if a row can’t be deleted. How can I access this message? I tried, but get
code for the delete button:
{{api1.run({id: tableQualityControlUnits.selectedRow.id})
.then(res => {
showAlert(‘Datensatz erfolgreich gelöscht’,‘success’);
api2t.run();
},
error => {
showAlert('Datensatz kann nicht gelöscht werden: '+ error[0].text, ‘error’)
})
}}
the response body from delete api is:
[
{
“text”: “Die Prüfung ist …”
}
]
so, I tried to access this message with: error[0].text
can anybody help me, please?
thx!