Details
-
Bug
-
Resolution: Invalid
-
Low
Description
400 error responses are currently returned as difficult-to-parse HTML:
#!html <ul class="errorlist"> <li>name <ul class="errorlist"><li>You already have a repository with this name.</li></ul> </li> </ul>
It stands to reason that json should be the default response type, since the response type for successful API calls is also json.
At the very least, the API should respect the Accept: header in the request. For example, if I send a request with the header "Accept: application/json", the API should know I want json and return that.
#!json { "errorlist": [ {"name": ["You already have a repository with that name"]} ] }