Skip to content

Instantly share code, notes, and snippets.

@kenelliott
Last active August 29, 2015 14:16
Show Gist options
  • Save kenelliott/1f02c46b8a312b8ced8f to your computer and use it in GitHub Desktop.
Save kenelliott/1f02c46b8a312b8ced8f to your computer and use it in GitHub Desktop.
API Error Responses
// Object Error(s): Current/Proposed
{
“errors”: {
“base”: [
“you can not do that”,
“nice try fool”
],
“first_name”: [
“can not be blank”,
“must include a capital letter”
],
“address.city”: [
“must include some numbers”,
“must be located on earth”
]
}
// General Error(s): Current
{
“error”: “insufficient_privileges”
}
// General Error(s): Proposed
{
“errors”: {
“base”: [
“user does not have privileges to complete this request”,
“crash override is a haxor”
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment