hmm not sure, we use Google sign-in no problem
hmm not sure, we use Google sign-in no problem
--local)
any type, and see if it works.any type to the catch block like so, and see if it stops throwing that error.const resp = await fetch(`...`, {
cf: {
cacheTtl: 60 * 10,
},
});catch (error) {
console.error(`Error while inserting row into accesslog table: ${error}`);
return Response.json({ message: `Error while inserting row into accesslog table: ${error.message}` });
}try {
// ...
} catch (error: any) {
console.error(`Error while inserting row into accesslog table: ${error}`);
return Response.json({ message: `Error while inserting row into accesslog table: ${error.message}` });
}try {
await env.DB.prepare(
"INSERT INTO accesslog (ip, time, path) VALUES (?1, ?2, ?3)"
).bind(ip, time, pathname).run();
} catch (error) {
console.error(`Error while inserting row into accesslog table: ${error}`);
return Response.json({ message: `Error while inserting row into accesslog table: ${error.message}` });
}
}try {
await env.DB.prepare(
"INSERT INTO accesslog (ip, time, path) VALUES (?1, ?2, ?3)"
).bind(ip, time, pathname).run();
} catch (error: any) {
console.error(`Error while inserting row into accesslog table: ${error}`);
return Response.json({ message: `Error while inserting row into accesslog table: ${error.message}` });
}
}