Skip to content

Commit

Permalink
dns: re-export error code constants from dns/promises
Browse files Browse the repository at this point in the history
  • Loading branch information
F3n67u committed May 22, 2022
1 parent 40162db commit 3f35532
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion lib/dns/promises.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
'use strict';

const dnsPromises = require('internal/dns/promises');
dnsPromises.setServers = require('dns').setServers;
const dns = require('dns');

dnsPromises.setServers = dns.setServers;

// ERROR CODES
dnsPromises.NODATA = dns.NODATA;
dnsPromises.FORMERR = dns.FORMERR;
dnsPromises.SERVFAIL = dns.SERVFAIL;
dnsPromises.NOTFOUND = dns.NOTFOUND;
dnsPromises.NOTIMP = dns.NOTIMP;
dnsPromises.REFUSED = dns.REFUSED;
dnsPromises.BADQUERY = dns.BADQUERY;
dnsPromises.BADNAME = dns.BADNAME;
dnsPromises.BADFAMILY = dns.BADFAMILY;
dnsPromises.BADRESP = dns.BADRESP;
dnsPromises.CONNREFUSED = dns.CONNREFUSED;
dnsPromises.TIMEOUT = dns.TIMEOUT;
dnsPromises.EOF = dns.EOF;
dnsPromises.FILE = dns.FILE;
dnsPromises.NOMEM = dns.NOMEM;
dnsPromises.DESTRUCTION = dns.DESTRUCTION;
dnsPromises.BADSTR = dns.BADSTR;
dnsPromises.BADFLAGS = dns.BADFLAGS;
dnsPromises.NONAME = dns.NONAME;
dnsPromises.BADHINTS = dns.BADHINTS;
dnsPromises.NOTINITIALIZED = dns.NOTINITIALIZED;
dnsPromises.LOADIPHLPAPI = dns.LOADIPHLPAPI;
dnsPromises.ADDRGETNETWORKPARAMS = dns.ADDRGETNETWORKPARAMS;
dnsPromises.CANCELLED = dns.CANCELLED;

module.exports = dnsPromises;

0 comments on commit 3f35532

Please sign in to comment.