marklagendijk/node-toogoodtogo-watcher

iftttEvents is not iterable

Closed this issue · 1 comments

Hi,

I just got this issue at the time an event was triggered:

/usr/local/lib/node_modules/toogoodtogo-watcher/node_modules/rxjs/internal/util/hostReportError.js:4
setTimeout(function () { throw err; }, 0);
^
TypeError: iftttEvents is not iterable
at notifyIFTTT (/usr/local/lib/node_modules/toogoodtogo-watcher/lib/ifttt.js:14:28)
at Object.notifyIfChanged (/usr/local/lib/node_modules/toogoodtogo-watcher/lib/notifier.js:44:7)
at SafeSubscriber.pollFavoriteBusinesses$.subscribe [as _next] (/usr/local/lib/node_modules/toogoodtogo-watcher/index.js:41:32)
at SafeSubscriber.__tryOrUnsub (/usr/local/lib/node_modules/toogoodtogo-watcher/node_modules/rxjs/internal/Subscriber.js:205:16)
at SafeSubscriber.next (/usr/local/lib/node_modules/toogoodtogo-watcher/node_modules/rxjs/internal/Subscriber.js:143:22)
at Subscriber._next (/usr/local/lib/node_modules/toogoodtogo-watcher/node_modules/rxjs/internal/Subscriber.js:89:26)
at Subscriber.next (/usr/local/lib/node_modules/toogoodtogo-watcher/node_modules/rxjs/internal/Subscriber.js:66:18)
at MergeMapSubscriber.notifyNext (/usr/local/lib/node_modules/toogoodtogo-watcher/node_modules/rxjs/internal/operators/mergeMap.js:93:26)
at SimpleInnerSubscriber._next (/usr/local/lib/node_modules/toogoodtogo-watcher/node_modules/rxjs/internal/innerSubscribe.js:27:21)
at SimpleInnerSubscriber.Subscriber.next (/usr/local/lib/node_modules/toogoodtogo-watcher/node_modules/rxjs/internal/Subscriber.js:66:18)

Regards,

This is a configuration issue. The webhookEvents property inside the IFTTT config must be an array:

"webhookEvents": ["see README"]