modified the behavior to throw exception, the cap for MAX_SHARDS is at the DB level where the partitionNumber is stored as a short.