I have a form where city and date should be a primary key for a measurment. As it is impossible to ensure that with ODK I changed those 2 columns to a primary key within the database.
Now, when I'm trying to add a measurment for city and date combination that already exists the data are correctly NOT inserted and a message appears with Internal Server Error 500.
My question is if it is possible to forward the postgres error message (Primary Key constraint violation) to ODK, because Internal Server Error 500 could be everything (e.g. tomcat not running)?
My aim is to tell the user, that a record for that combination of city and date already exists.
I'm assuming you are using Aggregate? You will have to download the code at https://github.com/opendatakit/aggregate and find out where that response is set. This might be a good PR to send into Aggregate!
Looking to save time? Try ODK Cloud, the official managed hosting service from the creators of ODK.