Better error logging

master
Keith Irwin 2021-12-11 19:57:31 -07:00
parent 687ca059e5
commit 326ac86c8c
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ module.exports = {
host.ipv6.includes(`${env.IPV6_NET}:${subnet}:`)
)) {
console.error(
`Found unmatching IP address subnets for ${ip}: \
`ERROR! Found unmatching IP address subnets for ${ip}: \
${found_hosts.map( (host) => [host.ipv4,host.ipv6] )}`
); reject(500)
// Check that the ip is "on the list"
@ -62,7 +62,7 @@ module.exports = {
// Check that all usernames are the same correct or error out
// https://stackoverflow.com/a/35568895
} else if (!found_usernames.every( (v,i,r) => v === r[0] )) {
console.error(`Found unmatching usernames for ${ip}: ${found_usernames.toString()}`)
console.error(`ERROR! Found unmatching usernames for ${ip}: ${found_usernames.toString()}`)
reject(500)
} else {
resolve({