improve error message from transaction insert trigger
add constraints to email