Implement a statistics HTTP server

Why isn't returning an exception a valid response?