I am facing a issue while running nodejs script with request-replay module in APIGEE.I have referenced by including the dependencies.Earlier there was an issue "Cannot find module request-replay" which was fixed by referring.Now,I am facing error as ,
" *** Starting script *** Script ReqRep.js exited with status code 0 "
My ReqRes.js script goes as below.This is the same program given in the link https://github.com/IndigoUnited/node-request-replay/blob/master/README.md.Even the Node.js logs does not present any other useful information to fix the issue.Could not find any relevant links in community posts for similar issue.Please let me know what could be the issue.
var fs = require('fs'); var request = require('request'); var replay = require('request-replay'); // Note that the options argument is optional // Accepts the same options the retry module does and an additional // errorCodes array that default to ['EADDRINFO', 'ETIMEDOUT', 'ECONNRESET', 'ESOCKETTIMEDOUT'] replay(request('http://google.com/doodle.png', function (err, response, body) { // Do things }), { retries: 10, factor: 3 }) .on('replay', function (replay) { // "replay" is an object that contains some useful information console.log('request failed: ' + replay.error.code + ' ' + replay.error.message); console.log('replay nr: #' + replay.number); console.log('will retry in: ' + replay.delay + 'ms') })