e.g. POST /foo -> worker kicks off an internal fetch() to /someapi, meanwhile responds to the POST /
e.g. POST /foo -> worker kicks off an internal fetch() to /someapi, meanwhile responds to the POST /foo with (202)

Cannot create binding for class in script 'worker-A' that does not exist [code: 10061]data.set("settings", JSON.stringify({ bindings }));data is a FormData objectmethodX(), I get this error:The name of the entrypoint to bind to. If you do not specify an entrypoint, the default export of the Worker will be used.


Cannot create binding for class in script 'worker-A' that does not exist [code: 10061]data.set("settings", JSON.stringify({ bindings }));methodX()The RPC receiver does not implement the method "methodX"# wrangler.toml B
name = "worker-B"
# ...
[env.dev.durable_objects]
bindings = [
{ name = "DO", class_name = "Do", script_name="worker-A" }
]# wrangler.toml A
name = "worker-A"
# ...
[env.dev.durable_objects]
bindings = [
{ name = "DO", class_name = "Do" }
]
[[migrations]]
tag = "v1"
new_sqlite_classes = ["Do"]compatibility_date = "2024-10-22"
[[env.staging.services]]
binding = "STORAGE_SERVICE"
service = "storage_service"
entrypoint = "StorageService"compatibility_date = "2024-10-22"
[[env.staging.services]]
binding = "STORAGE_SERVICE"
service = "storage_service"
entrypoint = "StorageService"export class StorageService extends WorkerEntrypoint<Bindings> {
async methodX() {
// stuff happens here
}
}
export default {
async fetch() {
return new Response("Hello world");
}
}compatibility_date = "2024-10-22"
[[env.staging.services]]
binding = "STORAGE_SERVICE"
service = "storage_service"export default class StorageService extends WorkerEntrypoint<Bindings> {
async methodX() {
// stuff happens here
}
}const response = await env.AI.run(
("@hf/meta-llama/meta-llama-3-8b-instruct",
payload
);
return new Response(response, {
headers: {
"content-type": "text/event-stream",
},
});