diff --git a/index.js b/index.js
index c309164cd5cf5324b18677fec4c56f5b3d4fdb0a..fbdf7ca7f9bb6db18bdd75c7774c571cd0e32ddf 100644
--- a/index.js
+++ b/index.js
@@ -314,8 +314,8 @@ 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.code === 404) && 
+      err.error === "no_data_found") {
       log('info', 'Handling half-hour error on connection')
       return false
     } else {