Duckit69
Explore posts from serversKPCKevin Powell - Community
•Created by Duckit69 on 3/30/2025 in #back-end
Problem with Prisma
i have a prisma.schema file
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
and three other models that connect normally they get the url from prisma.schema ( i followed the docs ) but the User Model cant find the URL for some reason and keep throwing that error8 replies
KPCKevin Powell - Community
•Created by Duckit69 on 3/30/2025 in #back-end
Problem with Prisma
btw hardcoing it in this specific model seems to work
const prisma = new PrismaClient({
datasources: {
db: {
url: "prisma+postgres://accelerate.prisma-data.net/?api_key=SOMERANDOMLETTERsI",
},
},
});
what triggers me the most why only this specific model is throwing this error other models work fine8 replies
KPCKevin Powell - Community
•Created by Duckit69 on 3/30/2025 in #back-end
Problem with Prisma
even running npx prisma db pull and npx prisma migrate is fine
8 replies
KPCKevin Powell - Community
•Created by Duckit69 on 3/30/2025 in #back-end
Problem with Prisma
they connect to the same database using the same database_url
8 replies
KPCKevin Powell - Community
•Created by Duckit69 on 3/30/2025 in #back-end
Problem with Prisma
other queries run just fine
8 replies
KPCKevin Powell - Community
•Created by Duckit69 on 3/29/2025 in #front-end
Styling in React
You want me to put it in discussion?
8 replies
KPCKevin Powell - Community
•Created by Duckit69 on 3/23/2025 in #back-end
Having issue with error types in TypeScript
catch (error) {
if (error instanceof Prisma.PrismaClientKnownRequestError)
res.status(404).json({ message: error.meta?.cause });
res.status(404).json(error);
}
so far this is the way i am handeling it
i know returning error.meta.cause is not a good idea but my main focus is how to access specific attributes inside an error object3 replies