Standard HTTP status codes are used to indicate errors.
The following is an example of an error response (formatted for readability).
{
"type":"http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec10.html#sec10.4.2",
"title":"Bad credentials. Anonymous user resolved for a resource that requires authentication.",
"status":401,
"detail":"Unauthorized"
}
{
"type":"http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec10.html#sec10.4.2",
"title":"Badly formed parameters",
"status":400,
}