My question is like this
I want to check if the DELETE request fails due to a constraint violation. I would like to do this at the database level because I think letting it fail and catching the error is ugly.
Another โmanualโ option checks it with SELECT queries to see if there are restrictions, but it's pretty tedious, imho.
Is there a "native" way to do this?
source
share