slight better error message on constraint failure