is there no other _local_ file I/O alternative?
is there no other local file I/O alternative?
functions/[[path]].js and a functions/[[path]].js.map file. Do I expect stack traces to automatically use the sourcemap? Cause the logs are unreadable for me when I connect to a live function and an error happens.
tail.developers.workers.dev working right now?TypeError: Fetch API cannot load: /await on my call to the worker binding


_headers _redirects files feature and workers.js? _redirects file in same time.

_worker.js file, but it seems that cloudflare is not picking it.functions/[[path]].jsfunctions/[[path]].js.maptail.developers.workers.devTypeError: Fetch API cannot load: / "outcome": "canceled",
"response": {
"status": 200
}awaitwrangler pages deployment tail_headers_redirects_redirectsworkers.js_worker.js const request = new Request("/", payload);
const response = await env.WORKER_B.fetch(request);/**
* POST /api/submit
*/
export async function onRequestPost(context) {
try {
let input = await context.request.formData();
let pretty = JSON.stringify([...input], null, 2);
console.log(input.toString());
console.log("Sending Discord Message");
sendDiscordMessage("Website Contact Form", pretty, "https://discord.com/api/webhooks/1161255461614526525/");
return new Response(pretty, {
headers: {
'Content-Type': 'application/json;charset=utf-8',
},
});
} catch (err) {
return new Response('Error parsing JSON content', { status: 400 });
}
}
async function sendDiscordMessage(name, message, webhookUrl) {
await fetch(webhookUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
username: 'Website Contact Form',
embeds: [{
title: 'New Message',
type: 'rich',
fields: [
{
name: 'Name',
value: name,
},
{
name: 'Message',
value: message,
}
]
}]
}),
});
console.log("Message Sent");
console.log(fetch)
}