is there any way for cloudflare to change it to the correct translation? it would be "Tabellen"
is there any way for cloudflare to change it to the correct translation? it would be "Tabellen"
Error: D1_ERROR: internal error
... logged to D1 database { result: Promise { <pending> } }INSERT.Promise.await instead of then and catch, but I'd like to do this database insertion in a non-blocking way, preferably.await, I see the error, although I believe that makes the database insertion a blocking operation.await. You can't see the value of a Promise before it's completed, and the console.debug({}) is run before the result of the Promise.env and ctx?ExportedHandler and Env?const db = drizzle(env.DB); everywhere they need the db. is that the way to go? or is it still possible to somehow export 1 drizzle client globally? try {
// Check if the DB is reachable
env.DB.prepare("SELECT 1").first();
const result = env.DB.prepare("INSERT INTO ... (...) VALUES (?, ?, ?, ?)")
.bind()
.run()
.then((result: unknown) => {
console.debug("Insertion result:", result);
})
.catch((error: unknown) => {
console.error("Error inserting data:", error);
throw error; // Rethrow to handle in the catch block
});
console.debug({ ... }, "logged to D1 database", { result });
} catch (err) {
console.error("Insertion into", { env }, "failed", err);
} const result = env.DB.prepare("INSERT INTO ... (...) VALUES (?, ?, ?, ?)")
.bind()
.run(); async fetch(request: Request, env: any): Promise<Response>Error: D1_ERROR: internal error