fix exception type when retrying duplicates
Merge pull request #819 from code-dot-org/fix-duplicate-errors

fix exception type when retrying duplicates