diff --git a/CHANGELOG.md b/CHANGELOG.md index e446d07..cd2f245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## [v4.25.1](https://github.com/plivo/plivo-node/tree/v4.25.1) (2021-12-08) +**Bug Fix** +- Handling `undefined response` error from axios. +- Timeout has been eliminated for messaging requests. + ## [v4.25.0](https://github.com/plivo/plivo-node/tree/v4.25.0) (2021-12-02) **Features - Messaging: 10DLC API** - 10DLC API's for brand and campaign support diff --git a/lib/rest/axios.js b/lib/rest/axios.js index c927ed5..5504592 100644 --- a/lib/rest/axios.js +++ b/lib/rest/axios.js @@ -96,7 +96,7 @@ export function Axios(config) { .catch(function (error) { //client side exception like file not found case if (error.response == undefined){ - reject(error.stack ); + return reject(error.stack ); } const exceptionClass = { 400: Exceptions.InvalidRequestError, @@ -175,7 +175,7 @@ export function Axios(config) { if (typeof config.timeout !== 'undefined') { options.timeout = config.timeout; } - else if(typeof config.timeout === 'undefined'){ + else if(typeof config.timeout === 'undefined' && isVoiceReq ){ options.timeout = 5000; } @@ -212,7 +212,7 @@ export function Axios(config) { }) .catch(function (error) { if (error.response == undefined){ - reject(error.stack ); + return reject(error.stack ); } const exceptionClass = { 400: Exceptions.InvalidRequestError, @@ -268,7 +268,7 @@ export function Axios(config) { }) .catch(function (error) { if (error.response == undefined){ - reject(error.stack ); + return reject(error.stack ); } const exceptionClass = { 400: Exceptions.InvalidRequestError, diff --git a/package.json b/package.json index c15b9f5..bc3291e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.25.0", + "version": "4.25.1", "description": "A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML", "homepage": "https://github.com/plivo/plivo-node", "files": [