lib: gather all errors constant in the same place for consistency
Gather all errors constant in the same place for consistency in lib/net.js
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines