added callbacks to server.close in test teardown
added error (true/false) for error responses