Handle timeouts in the connections

Now (for example) showing "TimeoutError" instead of nothing at all, as error.getMessage() would return a null value.

@peter-budo