Hi,
How can I overcome the error 500 when the following request is made:
DELETE https://twisodev01.acto.nl/indicium/iam/5414/someview(id=576001)
it gives a nice dialog in the screen that an error occurred due to this:
delete instead of trigger on the view executes a delete on the realtable
the delete trigger on the realtable has some condition:
if exists (
select 1
from deleted d
where d.is_locked = 1
)
begin
exec dbo.tsf_send_message 'deletion_error', null, 1
rollback tran
return
end
Now the magic starts:
It returns a 500 error on the request, which is a server error (is it?),
it registers an error in the indicium log (is it really?)
and the debugger in the windows gui shows a System.Net.WebException(why?).
What is the proper way to let indicium handle such a delete action where a trigger prohibits the delete and sends back the message to the user it cannot delete the record due to some constraints - in a way that we will not get a 500 error, but a more usefull 4xx error?
rgds Ricky