Error handling code

- Display error message if no network connectivity