Skip to content

p2002 error by prisma was causing a 500 error so added a else if for that in main for the api to not send the error code before validation#168

Open
Divyanshslathia wants to merge 1 commit into
gothinkster:masterfrom
Divyanshslathia:error-resolving
Open

p2002 error by prisma was causing a 500 error so added a else if for that in main for the api to not send the error code before validation#168
Divyanshslathia wants to merge 1 commit into
gothinkster:masterfrom
Divyanshslathia:error-resolving

Conversation

@Divyanshslathia

Copy link
Copy Markdown

Prisma P2002 (unique constraint) errors were being returned as 500 Internal Server Errors, which made the issue harder to identify.
This update introduces explicit handling for P2002 so the API responds with a more meaningful error instead of a generic 500.

…that in main for the api to not send the error code only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant