redwoodjs / redwood

The App Framework for Startups
https://redwoodjs.com
MIT License
17.03k stars 977 forks source link

[RFC]: add error handler #8047

Open alirezaRaisSattari opened 1 year ago

alirezaRaisSattari commented 1 year ago

Summary

add error handler to handle duplicate error of prisma and other error of prisma(like "Foreign key constraint")

Motivation

for return precise error to client and cleaner code

Detailed proposal

a module for error handler and have capability to customize thank you for awesome framework i think it structure can be like interceptors in nest.js and angular

Are you interested in working on this?

jtoar commented 1 year ago

Hey @alirezaRaisSattari, I'm not sure if I understand what you're proposing yet. Could you include a code example? Is it just that you like how prisma does error handling and want to be able to use it?