import error handling of whois
This commit is contained in:
parent
50e4845d94
commit
6765de5936
|
@ -116,12 +116,16 @@ async function dummy() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveIPInfo(ip, isProxy, info) {
|
async function saveIPInfo(ip, isProxy, info) {
|
||||||
const whoisData = await whois(ip);
|
try {
|
||||||
IPInfo.upsert({
|
const whoisData = await whois(ip);
|
||||||
...whoisData,
|
IPInfo.upsert({
|
||||||
isProxy,
|
...whoisData,
|
||||||
pcheck: info,
|
isProxy,
|
||||||
});
|
pcheck: info,
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
logger.error(`Error whois for ${ip}: ${error.message}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user