Report question

Question: Detect mysql update/insertion failure due to violated unique constraint