From 7f1dbdc4cc09a05a5b835c6a25b6e958ad2964fd Mon Sep 17 00:00:00 2001 From: dhuy Date: Fri, 30 May 2014 10:55:46 -0300 Subject: [PATCH] Exception callback no reachable --- endpoints/video.js | 10 +++++----- endpoints/video_legenda.js | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/endpoints/video.js b/endpoints/video.js index 5fb295d..d54b666 100644 --- a/endpoints/video.js +++ b/endpoints/video.js @@ -91,7 +91,7 @@ function init(req, res) { }); requesting.on('error', function (e) { - console.log("The callback URL isn't reachable"); + console.log("The callback URL can not be reachable"); }); requesting.write(data); @@ -121,8 +121,8 @@ function init(req, res) { res.setEncoding('utf8'); }); - requesting.on('error', function (e) { - console.log("The callback URL isn't reachable"); + requesting.on('error', function (e) { + console.log("The callback URL can not be reachable"); }); requesting.write(data); @@ -152,8 +152,8 @@ function init(req, res) { res.setEncoding('utf8'); }); - requesting.on('error', function (e) { - console.log("The callback URL isn't reachable"); + requesting.on('error', function (e) { + console.log("The callback URL can not be reachable"); }); requesting.write(data); diff --git a/endpoints/video_legenda.js b/endpoints/video_legenda.js index 6e0f865..e262887 100644 --- a/endpoints/video_legenda.js +++ b/endpoints/video_legenda.js @@ -101,6 +101,10 @@ function init(req, res) { res.setEncoding('utf8'); }); + requesting.on('error', function (e) { + console.log("The callback URL can not be reachable"); + }); + requesting.write(data); requesting.end(); @@ -126,11 +130,12 @@ function init(req, res) { var requesting = http.request(options, function(res) { res.setEncoding('utf8'); - // res.on('data', function (chunk) { - // console.log("req.body: " + chunk); - // }); }); + requesting.on('error', function (e) { + console.log("The callback URL can not be reachable"); + }); + requesting.write(data); requesting.end(); @@ -158,6 +163,10 @@ function init(req, res) { res.setEncoding('utf8'); }); + requesting.on('error', function (e) { + console.log("The callback URL can not be reachable"); + }); + requesting.write(data); requesting.end(); -- libgit2 0.21.2