From 9538fd02e52d27f40d48bf0ebd65515dfd47cf9f Mon Sep 17 00:00:00 2001 From: Lenny Markus Date: Mon, 14 Dec 2015 10:25:10 -0800 Subject: [PATCH] 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 Reviewed-By: James M Snell --- doc/api/http.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 518dae063c..fb2cbae891 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -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.