doc: clarify error events in HTTP module documentation

Make it clear that error with throw if error listener is
not registered.

PR-URL: https://github.com/nodejs/node/pull/4275
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Lenny Markus authored and James M Snell committed 2015-12-14 15:11:18 -08:00
1 parent c6efd535e4
commit 9538fd02e5
1 file changed
+2 -1
+2 -1
View File
@@ -1063,7 +1063,8 @@ even if there is no data being written to the request body.
If any error is encountered during the request (be that with DNS resolution,
TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted
on the returned request object.
on the returned request object. As with all `'error'` events, if no listeners
are registered the error will be thrown.
There are a few special headers that should be noted.