hi team, my outbound worker is not getting called. what am i missing? i have defined the "outbound

hi team, my outbound worker is not getting called. what am i missing?

i have defined the "outbound worker" and attached to my dispatch namespace, and am executing user workers through the dispatch namespace with the outbound configuration as per docs, but i am not seeing the outbound worker get invoked. what am i missing? my configurations:

[[env.production.dispatch_namespaces]]
binding = "USER_WORKER_DISPATCHER"
namespace = "custom-tools-workers"
outbound = {service = "outbound-proxy", parameters = ["params_object"]}

(in env local, i have the same with remote = true – my outbound worker
outbound-proxy
does not have envs)

i can see this picked up as both wrangler locally and the dashboard show the outbound proxy:
env.USER_WORKER_DISPATCHER              Dispatch Namespace
  custom-tools-workers (outbound -> outbound-proxy)


my user workers are deployed to the dispatch namespace using
PUT https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/workers/dispatch/namespaces/${NAMESPACE_NAME}/scripts/${scriptName}


and are executed through the dispatcher:
const userWorker = env.USER_WORKER_DISPATCHER.get(
  scriptName,
  {},
  {
    outbound: {
      params_object: {
        tenantId,
      },
    },
  },
);

const response = await userWorker.fetch('https://dummy-url.local', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(testData),
});


but i'm not seeing the fetch handler of the outbound worker get called.

any help would be appreciated. thanks!
Was this page helpful?