Golang mongo driver error while inserting data to M0 cluster

I am getting this error while inserting data to mongo Atlas M0 general cluster from my golang application.

server selection error: server selection timeout, current topology: { Type: ReplicaSetNoPrimary, Servers:{ Addr: cluster0-shard-00-01.2cqcv.mongodb.net:27017… etc]

It was working fine and all of a sudden I start gin getting this error. Is it because its a free M0 cluster ?

I did not see any alerts in the alerts section. But in the project feed I am seeing the cluster is getting restarted.