Skip to content

Commit 3839bb6

Browse files
committed
Captured network error
1 parent 9ac5bd8 commit 3839bb6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/apicontrollersbase.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class APIOperationBase {
1515

1616
this._request = null;
1717
this._response = null;
18+
this._error = null;
1819
this._endpoint = constants.endpoint.sandbox;
1920

2021
if (null == apiRequest)
@@ -38,6 +39,10 @@ class APIOperationBase {
3839
return this._response;
3940
}
4041

42+
getError() {
43+
return this._error;
44+
}
45+
4146
getResultcode() {
4247
var resultcode = null;
4348

@@ -107,6 +112,7 @@ class APIOperationBase {
107112
logger.error("Undefined Response");
108113
}
109114
}).catch(error => {
115+
obj._error = error;
110116
logger.error(error);
111117
});
112118

0 commit comments

Comments
 (0)