Duckit69
KPCKevin Powell - Community
•Created by Duckit69 on 3/29/2025 in #front-end
Styling in React
this is my first react project and i have a question regarding styling my webpages
do i build html css ( seperatly and have an idea about what css classes i should have etc )
or build my react components and go from there
8 replies
KPCKevin Powell - Community
•Created by Duckit69 on 3/23/2025 in #back-end
Having issue with error types in TypeScript
async function getUserById(req: Request, res: Response) {
const userId = parseInt(req.params.id);
try {
const user = await prisma.user.findUniqueOrThrow({
where: {
id: userId,
},
});
res.status(200).json(user);
} catch (error: Prisma.PrismaClientKnownRequestError) {
res.status(404).json({ message: error.meta });
}
}
problem: TSError: ⨯ Unable to compile TypeScript:
controllers/userController/userController.ts:36:19 - error TS1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified.
the error returned is of type Prisma.PrismaClientKnownRequestError
i dont quite understand the problem3 replies