better API responses
Currently, the API sometimes behaves like a webapp. Eventually, we want to separate them entirely.
For now, these two things should be improved:
(1) don't return error on empty request
this command
curl -H "Accept: application/json" https://api.dev.bitmask.net:4430/1
should return an ok response, not an error.
(2) always return json response
currently, you might get html responses to api urls if there is an error and you forget to do set the header "Accept: application/json". the API should always return JSON, no matter what.
(from redmine: created on 2016-04-03)