From 33d5935bc3c4ddc1368163c01e3b658e977e8a9e Mon Sep 17 00:00:00 2001 From: Lenny Markus Date: Mon, 14 Dec 2015 10:25:10 -0800 Subject: [PATCH 1/2] Clarify error events on HTTP module documentation --- 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 091f738be6b2fa..22a1017c760f95 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -1061,7 +1061,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. If no `'error'` listeners are registered +the error will be thrown. There are a few special headers that should be noted. From 5d370779fd1f97d96153e6360e8031a38a9751e8 Mon Sep 17 00:00:00 2001 From: Lenny Markus Date: Mon, 14 Dec 2015 13:57:21 -0800 Subject: [PATCH 2/2] Update http.markdown --- doc/api/http.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 22a1017c760f95..5dd5f3ac63eca1 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -1061,7 +1061,7 @@ 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. If no `'error'` listeners are registered +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.