Fix typo in HTTP transport error handler
Refactor _buildConnector by removing a bunch of code