Skip to content

Commit

Permalink
Merge pull request #230 from plivo/timeout-remove-sms
Browse files Browse the repository at this point in the history
fix: eliminate timeout for messaging
  • Loading branch information
huzaif-plivo authored Dec 8, 2021
2 parents 04de28a + fc5eae0 commit 72447ef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions lib/rest/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down

0 comments on commit 72447ef

Please sign in to comment.