From 2e59a6ea042266e455c10bd181e0bb8bd023f0cd Mon Sep 17 00:00:00 2001 From: narayana Date: Tue, 7 Sep 2021 15:40:31 +0530 Subject: [PATCH 1/3] fixing customer issue --- CHANGELOG.md | 3 +++ lib/rest/axios.js | 10 ++++++++++ package.json | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf298a9..a24509d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## [v4.22.1](https://github.com/plivo/plivo-node/tree/v4.22.1) (2021-09-07) +- Bug fix on voice get request and exception handle. + ## [v4.22.0](https://github.com/plivo/plivo-node/tree/v4.22.0) (2021-08-17) - Fix [add numbers to a powerpack](https://www.plivo.com/docs/sms/api/numberpool/#add-a-number) API by reverting retrievable object responses support for [Retrieve a Power pack API](https://www.plivo.com/docs/sms/api/powerpack#retrieve-a-powerpack). diff --git a/lib/rest/axios.js b/lib/rest/axios.js index ba74448..c927ed5 100644 --- a/lib/rest/axios.js +++ b/lib/rest/axios.js @@ -183,6 +183,10 @@ export function Axios(config) { if (isVoiceReq) { retryWrapper(axios, {retryTime: 2, urls: apiVoiceUris, authId: config.authId, action: action}); options.url = apiVoiceUris[0] + config.authId + '/' + action; + if (method === 'GET' && options.data !== '') { + let query = '?' + queryString.stringify(params); + options.url += query; + } axios(options).then(response => { const exceptionClass = { 400: Exceptions.InvalidRequestError, @@ -207,6 +211,9 @@ export function Axios(config) { }); }) .catch(function (error) { + if (error.response == undefined){ + reject(error.stack ); + } const exceptionClass = { 400: Exceptions.InvalidRequestError, 401: Exceptions.AuthenticationError, @@ -260,6 +267,9 @@ export function Axios(config) { } }) .catch(function (error) { + if (error.response == undefined){ + reject(error.stack ); + } const exceptionClass = { 400: Exceptions.InvalidRequestError, 401: Exceptions.AuthenticationError, diff --git a/package.json b/package.json index e76ea7e..c443cf1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.22.0", + "version": "4.22.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": [ From b9cf26b07928f83b833ed14c92c8471137f4f7f5 Mon Sep 17 00:00:00 2001 From: Mohammed Huzaif Date: Tue, 7 Sep 2021 16:15:07 +0530 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a24509d..1f32dac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Change Log ## [v4.22.1](https://github.com/plivo/plivo-node/tree/v4.22.1) (2021-09-07) -- Bug fix on voice get request and exception handle. +- Fix on voice `GET` request and exception handle. ## [v4.22.0](https://github.com/plivo/plivo-node/tree/v4.22.0) (2021-08-17) - Fix [add numbers to a powerpack](https://www.plivo.com/docs/sms/api/numberpool/#add-a-number) API by reverting retrievable object responses support for [Retrieve a Power pack API](https://www.plivo.com/docs/sms/api/powerpack#retrieve-a-powerpack). From cae0e9408123d6cc5eefeaa5a5935e48c4fb57b9 Mon Sep 17 00:00:00 2001 From: huzaif-plivo Date: Wed, 8 Sep 2021 13:14:28 +0530 Subject: [PATCH 3/3] updated changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f32dac..ad3d188 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## [v4.22.1](https://github.com/plivo/plivo-node/tree/v4.22.1) (2021-09-07) +## [v4.22.1](https://github.com/plivo/plivo-node/tree/v4.22.1) (2021-09-08) - Fix on voice `GET` request and exception handle. ## [v4.22.0](https://github.com/plivo/plivo-node/tree/v4.22.0) (2021-08-17)