Skip to content

Commit 940b78d

Browse files
readme.md & version update
1 parent 23682b8 commit 940b78d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ This example demonstrates how to add custom headers to your email message.
174174
### [Basic send with a web proxy](https://github.com/socketlabs/socketlabs-nodejs/blob/master/examples/basic/basicSendWithProxy.js)
175175
This example demonstrates how to use a proxy with your HTTP client.
176176

177+
### [Basic send with retry enabled](https://github.com/socketlabs/socketlabs-nodejs/blob/master/examples/basic/basicSendWithRetry.js)
178+
This example demonstrates how to use the retry logic with your HTTP client.
179+
177180
### [Basic send complex example](https://github.com/socketlabs/socketlabs-nodejs/blob/master/examples/basic/basicSendComplexExample.js)
178181
This example demonstrates many features of the Basic Send, including adding multiple recipients, adding message and mailing id's, and adding an embedded image.
179182

@@ -211,6 +214,7 @@ For more information about AMP please see [AMP Project](https://amp.dev/document
211214

212215
<a name="version"></a>
213216
# Version
217+
* 1.2.1 - Adding optional retry logic for Http requests. If configured, the request will retry when certain 500 errors occur (500, 502, 503, 504)
214218
* 1.1.1 - Adding request timeout value on the client for Http requests
215219
* 1.1.0 - Adds Amp Html Support
216220
* 1.0.0 - Initial Release

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@socketlabs/email",
3-
"version": "1.1.1",
3+
"version": "1.2.1",
44
"description": "SocketLabs Email Delivery node.js client library",
55
"main": "./src/socketlabsClient.js",
66
"repository": {
@@ -31,4 +31,4 @@
3131
"axios": "^0.21.1",
3232
"promise-retry": "^2.0.1"
3333
}
34-
}
34+
}

src/socketlabsClient.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,12 @@ class SocketLabsClient {
176176
} else {
177177
reject(response)
178178
}
179-
180179
}, (error) => {
181180
let statusCode = (error.code) ? error.code : (error.status) ? error.status : error.response.status;
182181
let result = new sendResponse({ result: sendResultEnum[statusCode] });
183182
if (statusCode == "ECONNABORTED") {
184183
result = new sendResponse({ result: sendResultEnum.Timeout });
185184
}
186-
187185
if (typeof error === 'string') result.responseMessage = error;
188186
reject(result);
189187
})

0 commit comments

Comments
 (0)