You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
When I do ipfs.dns('docs.ipfs.io'). It throws an error 'ENODATA'. I did some digging and found out that this error is thrown by nodejs' dns.resolveTxt method when it does not find any txt records.
Now, to handle subdomain correctly, we need to append _dnslink. string to it, which we do here
The easiest solution to this problem would be to check for err.code 'ENODATA' also along with 'ENOTFOUND', etc. in the if condition. So, the next lines get a chance to be executed.
When I do ipfs.dns('docs.ipfs.io'). It throws an error 'ENODATA'. I did some digging and found out that this error is thrown by nodejs'
dns.resolveTxt
method when it does not find any txt records.Now, to handle subdomain correctly, we need to append
_dnslink.
string to it, which we do herejs-ipfs/src/core/runtime/dns-nodejs.js
Lines 20 to 22 in 3ef1ed4
But, the problem is, the error is way before the line gets to be executed, here:
js-ipfs/src/core/runtime/dns-nodejs.js
Line 11 in 3ef1ed4
The easiest solution to this problem would be to check for err.code 'ENODATA' also along with 'ENOTFOUND', etc. in the if condition. So, the next lines get a chance to be executed.
Basically something like this:
Would fix the problem.
What do you think?
The text was updated successfully, but these errors were encountered: