theforeman/foreman — pull request #1180 by eLobato (2014-01-21 15:58:32+00:00)
Title: Bug #3869 API error messages poorly formatted

This fix wraps all API errors with the key "error", and fixes the problem with erroneous metadata being showed on errors. I have also dropped ```route_error``` as the catch-all route was removed recently to allow plugins define their own routes.

```json
{
"error": {"message":"Unable to authenticate user asdasd"}
}
```

http://projects.theforeman.org/issues/3869