Currently, the Prisma exception filter provided by the package maps Prisma exceptions to their corresponding HTTP exceptions, but the message of the HTTP exception is the same as the message of the underlying Prisma exception. This can result in error messages that are explicit.
I am willing to work on a pull request so that this response:
{
"statusCode": 404,
"message": "Not Found"
}
is sent instead of this response:
{
"statusCode": 404,
"message": "[P2025]: An operation failed because it depends on one or more records that were required but not found. No 'User' record(s) (needed to inline the relation on 'FriendInvitation' record(s)) was found for a nested connect on one-to-many relation 'receivedFriendInvitations'."
}
Currently, the Prisma exception filter provided by the package maps Prisma exceptions to their corresponding HTTP exceptions, but the message of the HTTP exception is the same as the message of the underlying Prisma exception. This can result in error messages that are explicit.
I am willing to work on a pull request so that this response:
is sent instead of this response:
But I'm not sure how to approach this.