Is it possible to use service bindings with `vectorize` db?
I have a worker A that uses worker B. This worker B has bindings to a
vectorize
index (this index works when used by itself).
Both are deployed (given that vectorize doesn't work locally) , but this fail with Cannot read properties of undefined (reading 'VECTORIZE')
, which is the binding defined in
the wrangler.toml
for WorkerB
. I guess i'm missing something obvious or this cannot work. (the deployed url from the worker A fails with Error 1101
)
2 Replies
That won't work like you expect - you can access env from entrypoints with
this.env
https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/rpc/#bindings-env
thanks!