ERROR: prepared statement "s9656" does not exist

Not sure why I'm getting this because I have no prepared statement. I thought it might have been a bug with relational queries so I tried a regular select too. Both of these result in the same error.
import { db } from "drizzle";
import { eq } from "drizzle-orm";
import { fineTunesTable } from "drizzle/schema";

export async function GET(request: Request) {
try {
const { searchParams } = new URL(request.url);
const projectId = searchParams.get("projectId");
// const fineTunes = await db.query.fineTunesTable.findMany({
// where: eq(fineTunesTable.projectId, Number(projectId)),
// });
const fineTunes = await db
.select()
.from(fineTunesTable)
.where(eq(fineTunesTable.projectId, Number(projectId)));
return new Response(JSON.stringify(fineTunes), { status: 200 });
} catch (error) {
console.error("An error occurred:", error);
return new Response(JSON.stringify("An error occurred"), { status: 500 });
}
}
import { db } from "drizzle";
import { eq } from "drizzle-orm";
import { fineTunesTable } from "drizzle/schema";

export async function GET(request: Request) {
try {
const { searchParams } = new URL(request.url);
const projectId = searchParams.get("projectId");
// const fineTunes = await db.query.fineTunesTable.findMany({
// where: eq(fineTunesTable.projectId, Number(projectId)),
// });
const fineTunes = await db
.select()
.from(fineTunesTable)
.where(eq(fineTunesTable.projectId, Number(projectId)));
return new Response(JSON.stringify(fineTunes), { status: 200 });
} catch (error) {
console.error("An error occurred:", error);
return new Response(JSON.stringify("An error occurred"), { status: 500 });
}
}
And just as proof, here's a screen shot of my axiom logs showing this error with the API route as well as a screen shot of the file so you know I'm getting this error from this code specifically. Anyone have any idea what could be going on?
No description
No description
7 Replies
Noahh
Noahh15mo ago
This seems like it might be the same issue as #Prepared Statement doesn't exist @Andrew Sherman
Andrii Sherman
Andrii Sherman15mo ago
It may be it @thisisnotawill what driver are you using for this?
Will
WillOP15mo ago
@Andrew Sherman neon http serverless
Screw
Screw14mo ago
did you ever figure this out?
Will
WillOP14mo ago
@softwarecurator no sorry
Screw
Screw14mo ago
are you still getting the issue ?
justjumper
justjumper14mo ago
I think this is an issue with Neon We've been having tons of problems with them, and it seems they have no Discord / Slack channel to ask for support Sadly, we'll likely be moving over to PlanetScale
Want results from more Discord servers?
Add your server