Skip to content

Instantly share code, notes, and snippets.

@seeruk
Last active August 29, 2015 14:06
Show Gist options
  • Save seeruk/99b76505135a2aeaef9d to your computer and use it in GitHub Desktop.
Save seeruk/99b76505135a2aeaef9d to your computer and use it in GitHub Desktop.
Constraint Violation Response - Email Unique Entity Assertion
REQUEST:
{
"forename": "Elliot",
"surname": "Wright",
"email": "elliot@byng.co",
"date_of_birth": "1992-03-18"
}
RESPONSE:
{
"_links":{
"self":{
"href":"\/app_dev.php\/checks\/righttowork"
}
},
"code":0,
"type":"ProfileGuruChecks\\Bundle\\RestBundle\\Input\\Exception\\ConstraintViolationException",
"message":"Constraint violation, 1 error(s).",
"errors":[
{
"field":"email",
"message":"This email address is already in use."
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment