Skip to content

Commit 84b1875

Browse files
committed
Added exception handling for connection timeout
1 parent 8bbb2ef commit 84b1875

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

generator/cybersource-javascript-template/ApiClient.mustache

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@
738738
} else if (error.code && error.code == "ERR_BAD_REQUEST") {
739739
userError = _this.translate404Error(error);
740740
response = userError.response;
741+
} else if (error.code && error.code == "ETIMEDOUT") {
742+
userError = _this.translateProxyIssue(error);
741743
} else {
742744
userError = _this.translateError(error);
743745
response = userError.response;
@@ -760,6 +762,8 @@
760762
} else if (error.code && error.code == "ERR_BAD_REQUEST") {
761763
userError = _this.translate404Error(error);
762764
response = userError.response;
765+
} else if (error.code && error.code == "ETIMEDOUT") {
766+
userError = _this.translateProxyIssue(error);
763767
} else {
764768
userError = _this.translateError(error);
765769
response = userError.response;

0 commit comments

Comments
 (0)