diff --git a/index.js b/index.js index fbdf7ca7f9bb6db18bdd75c7774c571cd0e32ddf..bd46b37bac5c2a4f6ddca1b80d782d187b7b2029 100644 --- a/index.js +++ b/index.js @@ -314,8 +314,9 @@ async function checkConsentForLoadCurve( log('info', 'No consent for load curve') return false } else if ( - (err.statusCode === 404 || err.code === 404) && - err.error === "no_data_found") { + (err.statusCode === 404 && + err.error === "no_data_found") || (err.code === 404 && + err.error === "no_data_found")) { log('info', 'Handling half-hour error on connection') return false } else {