fix exception handling

With the introduction of Sequel the database exception classes changed
and many errors were no longer caught.
fix unique constraint name
update error message to reflect updated constraint