Handling no connection

When there is no internet, the code will return an error with the error
message.
Merge pull request #1 from ISMAELMARTINEZ/master

Handling no connection