Can't connect to mongodb.Could not connect to any servers in your MongoDB Atlas cluster

while trying to connect with mongodb i’m getting this error :

MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common 
reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/
    at NativeConnection.Connection.openUri (D:\Node-Jonas\Node-Projects\node_modules\mongoose\lib\connection.js:828:32)
    at Mongoose.connect (D:\Node-Jonas\Node-Projects\node_modules\mongoose\lib\index.js:335:15)
    at Object.<anonymous> (D:\Node-Jonas\Node-Projects\server.js:21:4)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  reason: TopologyDescription {
    type: 'ReplicaSetNoPrimary',
    setName: null,
    maxSetVersion: null,
    maxElectionId: null,
    servers: Map {
      'cluster0-shard-00-00-g4ttz.mongodb.net:27017' => [ServerDescription],
      'cluster0-shard-00-01-g4ttz.mongodb.net:27017' => [ServerDescription]
    },
    stale: false,
    compatible: true,
    compatibilityError: null,
    logicalSessionTimeoutMinutes: null,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    commonWireVersion: null
  }
}

i already whitelisted my ip but still getting the problem.also can’t connect to compass. it was all fine even yesterday and so don’t know why all of suuden this problem occured.need help.Thanks