net: give better error messages

Add address and/or port to errors where applicable for better reporting.

See #7005
Just add `port: null`. Object maps are generated by the names and order of object properties, so each object will generate the same object map.