From 783b5b74f1922db21a67a0cb51db5dd8ce1a9c2c Mon Sep 17 00:00:00 2001 From: Ho Ngoc Hai Date: Fri, 10 Apr 2026 21:21:25 +0700 Subject: [PATCH] fix(shared): handle Prisma errors in GlobalExceptionFilter to return proper HTTP status codes Prisma errors (P2025 record not found, P2002 unique constraint, P2003 foreign key) were falling through to the catch-all handler and returning 500 Internal Server Error instead of appropriate 404/409/400. This caused GET /listings/:id with a non-existent ID to return 500 when the Prisma layer threw before the application null check. Co-Authored-By: Paperclip