Skip to content

Commit d87ad30

Browse files
Lenny MarkusMyles Borins
Lenny Markus
authored and
Myles Borins
committed
doc: clarify error events in HTTP module documentation
Make it clear that error with throw if error listener is not registered. PR-URL: #4275 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent d47f6ba commit d87ad30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/http.markdown

+2-1
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,8 @@ even if there is no data being written to the request body.
10631063

10641064
If any error is encountered during the request (be that with DNS resolution,
10651065
TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted
1066-
on the returned request object.
1066+
on the returned request object. As with all `'error'` events, if no listeners
1067+
are registered the error will be thrown.
10671068

10681069
There are a few special headers that should be noted.
10691070

0 commit comments

Comments
 (0)