I started getting a weird error with one

I started getting a weird error with one of my inserts. This is a new problem, the code didn't change in months but, all of the sudden I get " Internal error in D1 storage caused object to be reset". Anybody has any idea how to fix this?
4 Replies
Lucian
LucianOP12mo ago
Here is the code that runs: try{ let res = null
const info = await c.env.DB.prepare(INSERT INTO scores_overunder ( userid, redTeam1id, redTeam2id, blueTeam1id, blueTeam2id, redTeam1Number, redTeam2Number, blueTeam1Number, blueTeam2Number, red_total, blue_total, red_auto_bonus, blue_auto_bonus, red_goal_points, red_field_points, blue_goal_points, blue_field_points, red1_height, red2_height, blue1_height, blue2_height, red1_height_bonus, red2_height_bonus, blue1_height_bonus, blue2_height_bonus, collected, created, type, total_time) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, DATETIME('now'), ?, ? )).bind( userid, data.redTeam1id, data.redTeam2id, data.blueTeam1id, data.blueTeam2id, data.redTeam1Number, data.redTeam2Number, data.blueTeam1Number, data.blueTeam2Number, data.red_total, data.blue_total, data.red_auto_bonus, data.blue_auto_bonus, data.red_goal_points, data.red_field_points, data.blue_goal_points, data.blue_field_points, data.red1_height, data.red2_height, data.blue1_height, data.blue2_height, data.red1_height_bonus, data.red2_height_bonus, data.blue1_height_bonus, data.blue2_height_bonus, data.collected, data.type, data.total_time) .run();
res = {result: info}
return c.json(res) } catch (e:any) {console.log(e.cause);}
Cyb3r-Jak3
Cyb3r-Jak312mo ago
What is the ID of your database?
Lucian
LucianOP12mo ago
8c0b4f3d-f92c-42fe-b593-dabfecc46414
Cyb3r-Jak3
Cyb3r-Jak312mo ago
CC @Matt
Want results from more Discord servers?
Add your server