Handle ConnectionRefusedError in http_api app.