Skip to content

Commit 9538fd0

Browse files
Lenny Markusjasnell
Lenny Markus
authored andcommitted
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c6efd53 commit 9538fd0

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)