set the insertion of the error messages in the database