Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better reference to the violating field in an error of unique constraint #315

Open
faurehu opened this issue Jan 24, 2019 · 1 comment
Open

Comments

@faurehu
Copy link

faurehu commented Jan 24, 2019

The Prisma server is responding with the following error after updateEmployee call:

{
    "data":null,
    "errors": [{
        "message": "A unique constraint would be violated on Employee. Details: Field name = email",
        "locations": [],
        "path":["updateEmployee"],
        "code":3010,
        "requestId": "local:cjrb3kwep002f07437mcq7dje"
    }]
}

For my UI purposes, I would appreciate having a better reference to the field which is violating the constraint.

I also tried digging the code to have a better idea about where the error code comes from. I can only assume for now that 3010 means a unique field constraint is being violated.

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

No branches or pull requests

2 participants