Command failed with error -1 when configured with load balancer

Hi Team,
I m getting the below error when configuring the connection string with a load balancer. I have the connection string as:

mongodb://ADMIN:password@servername:27017/ADMIN?authMechanism=PLAIN&authSource=$external&ssl=true&retryWrites=false&loadBalanced=true

And I m using the java driver 4.6.
My java program does bulk writes and it was able to write documents and suddenly this error shows up.

Any help on this would be much appreciated.

The error message is not providing any insights into what caused the error.

Error:

com.mongodb.MongoCommandException: Command failed with error -1: '' on server <servername>:27017. The full
 response is {"code": -1, "ecid": "942fca33a9e34e77850d6fd23bcdc862", "ok": 0.0}
	at com.mongodb.internal.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:198) ~[mongodb-driver-core-4.6.0.jar:?]
	at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:413) ~[mongodb-driver-core-4.6
.0.jar:?]
	at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:337) ~[mongodb-driver-core-4.6.0.jar:?]
	at com.mongodb.internal.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection.java:116) ~[mongodb-driver-core-4.6.
0.jar:?]
	at com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.sendAndReceive(DefaultConnectionPool.java:644) ~[mongodb-driver-core-4.6.0.j
ar:?]
	at com.mongodb.internal.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:71) ~[mongodb-driver-core-4.6.0.jar:?]
	at com.mongodb.internal.connection.LoadBalancedServer$LoadBalancedServerProtocolExecutor.execute(LoadBalancedServer.java:159) ~[mongodb-driver-core-4.
6.0.jar:?]
	at com.mongodb.internal.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:226) ~[mongodb-driver-core-4.6.0.jar:?]
	at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:126) ~[mongodb-driver-core-4.6.0.jar:?]
	at com.mongodb.internal.operation.MixedBulkWriteOperation.executeCommand(MixedBulkWriteOperation.java:517) ~[mongodb-driver-core-4.6.0.jar:?]
	at com.mongodb.internal.operation.MixedBulkWriteOperation.executeBulkWriteBatch(MixedBulkWriteOperation.java:379) ~[mongodb-driver-core-4.6.0.jar:?]