Skip to content

Instantly share code, notes, and snippets.

@christianklotz
Last active September 9, 2016 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianklotz/586ba79081257ed2f608b77cad81529b to your computer and use it in GitHub Desktop.
Save christianklotz/586ba79081257ed2f608b77cad81529b to your computer and use it in GitHub Desktop.
Error response for a food request resulting in a validation error
{
"message": "validation failed",
"code": 1234,
"errors": [{
"code": 5678,
"message": "not so healthy",
"field": "food",
"suggested_value": "🍎"
}]
}
@christianklotz
Copy link
Author

christianklotz commented Sep 9, 2016

The original request could have been something like

{
  "food": "burger"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment