Are you checking you actually received valid data at your API endpoint before you try to insert it into MongoDB? It looks like you have received an empty API call or something.
Are you checking you actually received valid data at your API endpoint before you try to insert it into MongoDB? It looks like you have received an empty API call or something.