Catches errors from the database when creating or updating records.