Currently, only 404 and 500 return json responses. As this is a 100% JSON API, all errors should return in the json format.