forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix query runner throwing 500 when pg_graphql detects unique constrai…
…nt (twentyhq#5323) ## Context Since pg_graphql does not return specific error/exception, we have to map the error message and throw validation errors when needed This PR adds a check on unicity constraint error returned by pg_graphql when we are trying to insert duplicate records and returns a 400 instead of being handled by the exceptionHandler as a 500.
- Loading branch information
Showing
2 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters