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) {
|
||||
try {
|
||||
const whoisData = await whois(ip);
|
||||
IPInfo.upsert({
|
||||
...whoisData,
|
||||
isProxy,
|
||||
pcheck: info,
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error(`Error whois for ${ip}: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user