diff --git a/apps/infoalloggi/src/server/controllers/annunci.controller.ts b/apps/infoalloggi/src/server/controllers/annunci.controller.ts index 6920300..d80c070 100644 --- a/apps/infoalloggi/src/server/controllers/annunci.controller.ts +++ b/apps/infoalloggi/src/server/controllers/annunci.controller.ts @@ -75,10 +75,8 @@ export const getAnnunciByCod = async ({ .where("codice", "=", cod) .executeTakeFirst(); if (!annuncio) { - throw new TRPCError({ - code: "NOT_FOUND", - message: "Annuncio non trovato", - }); + console.error("Annuncio non trovato per codice:", cod); + return null; } return AnnuncioObjectWithImages(annuncio);