Catch curl exception

Some times curl produce exeption: Failed to connect to 2a02:2d8:0:a000::57f5:d710: Network is unreachable