moved ERROR_DUPLICATE_KEY 

Shouldn't have added that const there.