Fix error handling so that it does not fail if JSON is not returned.
Add unit tests for request throttling.
Move assertions to the TestCase (not the server).