Check for http status, correct isConnected return
Added HttpException for HTTP errors
InvalidArgumentException thrown on invalid resource
New line, code fix