Skip to content

lib, test: migrate _http_outgoing.js's remaining errors to internal/errors.js

cc @jasnell @joyeecheung

A couple of lib/_http_outgoing.js's errors were still in the "old style": throw new Error(<some message here>).

This PR migrates those 2 old style errors to the "new style": internal/errors.js's error-system.

In the future, changes to these errors' messages won't break semver-major status. With the old style, changes to these errors' messages broke semver-major status. It was inconvenient.

This PR also adapts _http_outgoing.js's tests accordingly.

Refs: https://github.com/nodejs/node/issues/17709

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

lib, test

Merge request reports

Loading