Added more robust response handling in DataProviderImpl

Return the connection inputStream for 2xx responses, errorStream for 4xx-5xx responses, and throw IOException for everything else