Better error logging
parent
687ca059e5
commit
326ac86c8c
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue