Support sharded DuplicateKey exceptions

JAVA-1103
Should this code go above the previous conditional?