Commit 1dec42ff258433250f9a29f70a519bc835d97ac8
1 parent
4f41239a
Exists in
master
and in
1 other branch
Exception callback no reachable
Showing
1 changed file
with
9 additions
and
3 deletions
Show diff stats
endpoints/video.js
@@ -88,6 +88,9 @@ function init(req, res) { | @@ -88,6 +88,9 @@ function init(req, res) { | ||
88 | 88 | ||
89 | var requesting = http.request(options, function(res) { | 89 | var requesting = http.request(options, function(res) { |
90 | res.setEncoding('utf8'); | 90 | res.setEncoding('utf8'); |
91 | + res.on('error', function (e) { | ||
92 | + console.log("The callback URL isn't reachable"); | ||
93 | + }); | ||
91 | }); | 94 | }); |
92 | 95 | ||
93 | requesting.write(data); | 96 | requesting.write(data); |
@@ -115,9 +118,9 @@ function init(req, res) { | @@ -115,9 +118,9 @@ function init(req, res) { | ||
115 | 118 | ||
116 | var requesting = http.request(options, function(res) { | 119 | var requesting = http.request(options, function(res) { |
117 | res.setEncoding('utf8'); | 120 | res.setEncoding('utf8'); |
118 | - // res.on('data', function (chunk) { | ||
119 | - // console.log("req.body: " + chunk); | ||
120 | - // }); | 121 | + res.on('error', function (e) { |
122 | + console.log("The callback URL isn't reachable"); | ||
123 | + }); | ||
121 | }); | 124 | }); |
122 | 125 | ||
123 | requesting.write(data); | 126 | requesting.write(data); |
@@ -145,6 +148,9 @@ function init(req, res) { | @@ -145,6 +148,9 @@ function init(req, res) { | ||
145 | 148 | ||
146 | var requesting = http.request(options, function(res) { | 149 | var requesting = http.request(options, function(res) { |
147 | res.setEncoding('utf8'); | 150 | res.setEncoding('utf8'); |
151 | + res.on('error', function (e) { | ||
152 | + console.log("The callback URL isn't reachable"); | ||
153 | + }); | ||
148 | }); | 154 | }); |
149 | 155 | ||
150 | requesting.write(data); | 156 | requesting.write(data); |