Does anybody have already experimented the following error message?
state should be: writes is not an empty list
Found when I was trying to write documents within the my dev mongodb
Does anybody have already experimented the following error message?
state should be: writes is not an empty list
Found when I was trying to write documents within the my dev mongodb
You don' t provide a lot of info... but if I were to guess, you are doing a bulk write using a list of UpdateOneModels or InsertOneModels. But the list is empty.
Caused by: java.lang.IllegalArgumentException: state should be: writes is not an empty list
Ensure you null check and check the size of list is greater than 0 before writing it to Mongo DB.
Something like
if(list != null && list.size() > 0){
enter code here
}