CLN: make network error classes optional for can_connect