This always happens when I’m developing and has been a brick wall for me. My connection to mongodb atlas becomes an error suddenly even tho I change back my code to the time the connection is doing good.
im not sure how to do this. Sometimes restarting my computer and getting a new connection string from atlas works. But I want to know what causes this or whats the direct solution for it
⨯ unhandledRejection: Error: querySrv EREFUSED _mongodb._tcp.cluster0.fnyideb.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:251:17)
at QueryReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: undefined,
code: 'EREFUSED',
syscall: 'querySrv',
hostname: '_mongodb._tcp.cluster0.fnyideb.mongodb.net'
}