Disallowed operation called within global scope...
I'm trying to call an async API wrapper within a worker, but whenever I try to add the
stats
function, I get "isallowed operation called within global scope. Asynchronous I/O (ex: fetch() or connect()), setting a timeout, and generating random values are not allowed within global scope". Unless I'm misinterpreting the documentation, is this not out of global scope (and inside a handler)?
2 Replies