You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand correctly, you a referring to cases where prisma itself throws due invalid fields in the query (for example a typo in the column name).
The reason the package doesn't catch the error and throw 400 is because we can't know for sure who provided the invalid property. It could be the client, but it could also be some AccessPolicy in which case 500 is appropriate (server logic).
I'm hoping by now prisma has some API to help us validate the client's crudQuery before applying the AccessPolicy constraints. That would at least bring us closer to being able to throw 400, but I still haven't had time to look into it. PR's are welcome if you have any ideas.
A malformed crudQuery in the request params causes a 500 currently. A better and more accurate error would be 400.
The text was updated successfully, but these errors were encountered: