Worker talking to worker service with itty-router
I'm trying to get worker-a to talk to worker-b service, the worker-b service is deployed and I'm serving up the worker-a via
wrangler dev
From worker-a:
From worker-b service:
But I just get
Is there a way to point to my local served worker service to debug what's going wrong?5 Replies
Workers-b should have wrangler.toml that register workers-a as a service.
maybe this could help you (https://developers.cloudflare.com/workers/wrangler/api/#multi-worker-example), you can spawn unstable_dev with
unstable_dev('script_path', { logLevel: "debug" }
and get debug logsit does, and have double checked
You can check in terminal if the request from b reach a
So even if I tail worker-b and dumb it down to just:
If I hit worker-b, everything works normally and tailing it gives results
When I call worker-b from worker-a, also dumbed worker-a down to:
index.ts
types.ts
wrangler.toml
I just get
Error 1101
and tail on worker-b gives no output
is it because the request is coming from another worker on the same account? If so, how can I get around it to pass data to worker-b
and think service bindings would not run into this issue
nvm its working when deployed, just not when local
going to mark as resolved but would be nice to know which cmd to use for local to work with service bingings