Corsix👾
Corsix👾
CDCloudflare Developers
Created by Corsix👾 on 9/26/2024 in #workers-help
service binding error.. why?
any ideas why i get this Error:
errorTypeError: The RPC receiver does not implement the method "textLableMatch".
errorTypeError: The RPC receiver does not implement the method "textLableMatch".
worker A "consumer":
export default {

async fetch(request, env, ctx) {
try {
const lables = ['stuff', 'bla', 'box'];
const text = 'blablablalballb!';

const result = await env.WORKER_TEXT_LABLE_MATCH.textLableMatch(lables, text);
return new Response(JSON.stringify(result));

} catch (error) {
return new Response("error" + error, { status: 500 });
}

},
};
export default {

async fetch(request, env, ctx) {
try {
const lables = ['stuff', 'bla', 'box'];
const text = 'blablablalballb!';

const result = await env.WORKER_TEXT_LABLE_MATCH.textLableMatch(lables, text);
return new Response(JSON.stringify(result));

} catch (error) {
return new Response("error" + error, { status: 500 });
}

},
};
Worker B "producer":
export class LableMatch extends WorkerEntrypoint {
async textLableMatch(lables, text) {
console.log('Running ai mathing');
console.log('lables:' + lables + 'text:' + text);
const result = await this.aiMatching(lables, text);
return result;
}
}
export class LableMatch extends WorkerEntrypoint {
async textLableMatch(lables, text) {
console.log('Running ai mathing');
console.log('lables:' + lables + 'text:' + text);
const result = await this.aiMatching(lables, text);
return result;
}
}
8 replies
CDCloudflare Developers
Created by Corsix👾 on 5/10/2024 in #workers-help
Post request, getting 405 error not allowed
I have a CF pages site that sends a post request to a worker with a api with Hono framework, when i run both worker and page localy it workes no problem, but when its remote on the cloud, and i send the post request form the page to the worker it gets a 405 error on the page. i have no idea why.
5 replies
CDCloudflare Developers
Created by Corsix👾 on 2/4/2024 in #pages-help
R2 binding questions
No description
7 replies