diff --git a/index.js b/index.js index 3bb39f62a504a86b7bb1ba059f68e03effa9907b..f7bcda00d53b8ba5aadc508a7432bb76883710de 100644 --- a/index.js +++ b/index.js @@ -313,8 +313,7 @@ async function checkConsentForLoadCurve( } else if (err.statusCode === 403 || err.code === 403) { log('info', 'No consent for load curve') return false - } else if ( - err.code === 404 && err.error === "no_data_found") { + } else if (err.code === 404 && err.error.search('no_data_found') > 0) { log('info', 'Handling half-hour error on connection') return false } else {