[Pkg-javascript-commits] [node-stream-http] 104/208: Don't turn exceptions thrown in the callback into 'error' events
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 13 13:39:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-stream-http.
commit 3bea2a493fb25ee9b2647d236ebc8122d3b7a89f
Author: John Hiesey <john at hiesey.com>
Date: Thu Oct 1 22:26:59 2015 -0700
Don't turn exceptions thrown in the callback into 'error' events
When using the fetch api, exceptions thrown inside
ClientRequest._onFinish, which also calls the user callback,
were being caught and turned into 'error' events. This is
not the correct behavior; these exceptions should remain
uncaught to let the browser print them to the console.
---
lib/request.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/request.js b/lib/request.js
index 4525d91..2702e7c 100644
--- a/lib/request.js
+++ b/lib/request.js
@@ -120,7 +120,7 @@ ClientRequest.prototype._onFinish = function () {
}).then(function (response) {
self._fetchResponse = response
self._connect()
- }).then(undefined, function (reason) {
+ }, function (reason) {
self.emit('error', reason)
})
} else {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-http.git
More information about the Pkg-javascript-commits
mailing list