Skip to content

Commit

Permalink
doc: clarify error events in HTTP module documentation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lenny Markus authored and jasnell committed Dec 14, 2015
1 parent c6efd53 commit 9538fd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/http.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 9538fd0

Please sign in to comment.