Skip to content

Commit

Permalink
Merge pull request #22 from ibm-wch/rel2.4.5
Browse files Browse the repository at this point in the history
Use default retry strategy for network errors when pushing resources.
  • Loading branch information
Thomas Dinger authored Apr 4, 2018
2 parents 1756bf4 + 3df0183 commit e0aa227
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

### v2.4.3 changes since 2.4.1
### v2.4.5 changes since 2.4.1

- Improved retry handling to also retry http requests on network or socket level errors, not just HTTP 429 and 5xx errors.

Expand Down
2 changes: 1 addition & 1 deletion CLI/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wchtools-cli",
"description": "Command line tools for IBM Watson Content Hub",
"version": "2.4.3",
"version": "2.4.5",
"keywords": [
"cli"
],
Expand Down
4 changes: 3 additions & 1 deletion authoring-api/assetsHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,9 @@ class AssetsHelper extends BaseHelper {
filterRetryPush (context, error, opts) {
let retVal = false;

if (error.statusCode) {
if (utils.retryNetworkErrors(error) ) {
retVal = true;
} else if (error.statusCode) {
// Determine whether the request should be retried, based on the status code for the error.
switch (error.statusCode) {
// 403 Forbidden - Handle the special case that sometimes occurs during authorization. In general we
Expand Down
2 changes: 1 addition & 1 deletion authoring-api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wchtools-api",
"description": "Tools API for IBM Watson Content Hub",
"version": "2.4.3",
"version": "2.4.5",
"keywords": [
"api",
"tools"
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": "prod-tools",
"version": "2.4.3",
"version": "2.4.5",
"author": "IBM Corporation",
"license": "Apache-2.0",
"bugs": {
Expand Down

0 comments on commit e0aa227

Please sign in to comment.