Fix Node.js script
I think `errno` and `code` used to be the same, but now it isn't?
This commit is contained in:
parent
33a428c325
commit
faffe4a642
1 changed files with 2 additions and 2 deletions
|
@ -12,9 +12,9 @@ async function main_loop() {
|
|||
json_object.push(`{"website_url":"${url}","response_type":"SUCCESS","response_code":"${String(response.statusCode)}","response_details":"${String(response.statusMessage)}"}`)
|
||||
}
|
||||
catch(e) {
|
||||
if (e.errno != 'ENOTFOUND') {
|
||||
if (e.code != 'ENOTFOUND') {
|
||||
console.log(`${url} exists!`)
|
||||
json_object.push(`{"website_url":"${url}","response_type":"ERROR","response_code":"${String(e.errno)}","response_details":"${String(e.syscall)}"}`)
|
||||
json_object.push(`{"website_url":"${url}","response_type":"ERROR","response_code":"${String(e.code)}","response_details":"${String(e.syscall)}"}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue