Last active
August 29, 2015 14:16
-
-
Save kenelliott/1f02c46b8a312b8ced8f to your computer and use it in GitHub Desktop.
API Error Responses
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
// 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