You can either create an error handler to trap any or spesific error OR check if table already has identical entry (some Id field) and perhaps update record instead of trying to insert new.