You can always wrap every DB call in try/catch, parse error and return a custom one.
I’m personally returning raw Prisma error to the front-end, but then parsing the error message and only showing the last part.
Prisma errors are normally long strings with many semicolons, so I just split by
;
and show the last two. I found that this is the most human-readable part of the error 😅