Or I need to be on the workers paid plan for 5$ first?
Or I need to be on the workers paid plan for 5$ first?


fetch, it just skip / stops running. Yesterday I assumed that the fetches were disabled on the queue, but minutes ago I saw an example on the CF Docs where a fetch is made inside a queue.https://developers.cloudflare.com/queues/examples/web-crawler-with-browser-rendering/#6-crawl-with-puppeteer
await ing the fetch? Do you have a try-catch handler and are you seeing any errors logged?awaiting the fetch and I also put inside a try/catch, but no error is logged. API URL log, and then the code skips everything below the logsend and sendBatch methods returning a single (or array of for batch) string(s) representing each message sent to the queuePromise<void>, is there any chance that this might come along, or even be an option to enable it in the command itself (eg MY_QUEUE.send('my payload', {resolveId: true})






fetchestry-catchtry/catchAPI URLsendsendBatchPromise<void>MY_QUEUE.send('my payload', {resolveId: true})try {
console.log('API URL :', `${env.STRAPI_API_URL}/c-orders`);
const connection = await fetch(`${env.STRAPI_API_URL}/c-orders`, {
headers: {
Authorization: `Bearer ${env.STRAPI_API_KEY}`,
'Content-Type': 'application/json',
},
method: 'POST',
body: JSON.stringify({
data: {
planId,
date: new Date(),
deliveryDate: new Date(deliveryDate * 1000),
status: 1,
details,
grossPrice: totalPrice,
finalPrice: totalPrice,
subscriptionId: subscription ? strapiSubscriptionId : null,
userId,
paymentId: paymentIntent,
paymentStatus: subscription ? 'processing' : 'success',
orderInfo: [],
stripeInvoiceId: invoice,
},
}),
});
console.log('connection :', connection);
const data = await connection.json();
console.log('data :', JSON.stringify(data, null, 2));
if (connection.status !== 200) wasOrderCreated = false;
wasOrderCreated = true;
} catch (err) {
console.log('err :', err);
return false;
}export interface Env {
MY_QUEUE: Queue;
}
export default {
async fetch(req: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
// if req.method is not POST , reject
if (req.method !== 'POST') {
return new Response('Sorry', { status: 405 });
}
const body = await req.json();
console.log(`got body: ${JSON.stringify(body)}`)
const result = await env.MY_QUEUE.send({
body: body,
contentType: "json",
});
console.log(`sent message to queue: ${JSON.stringify(result)}`);
return new Response(JSON.stringify({
return_code: "1",
return_message: "ok"
}), {
headers: { 'Content-Type': 'application/json' },
});
},
};"logs": [
{
"message": [
"got body: {\"data\":\"dat hart fd3 3\"}"
],
"level": "log",
"timestamp": 1696396087813
},
{
"message": [
"sent message to queue: undefined"
],
"level": "log",
"timestamp": 1696396087867
}
]