Handle invalid uris for tcp transport

Signed-off-by: Eli Skeggs <eskeggs@globesherpa.com>