seguimos depurando la api
Some checks failed
build-and-deploy / filter (push) Successful in 2s
Sync to GitHub / sync (push) Failing after 1s
build-and-deploy / build (push) Successful in 8s
build-and-deploy / deploy (push) Successful in 15s

This commit is contained in:
2025-05-30 12:51:47 -06:00
parent 97b879433d
commit 49829d9d2e
4 changed files with 7 additions and 6 deletions

View File

@@ -123,6 +123,7 @@ router.put('/:id', async (req, res) => {
res.json(tareaActualizada);
} catch (e) {
if (e instanceof Prisma.PrismaClientKnownRequestError) {
console.log(e);
if (e.code === 'P2025') {
return res.status(404).json({ message: 'Tarea no encontrada para actualizar.' });
}