File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,9 +102,10 @@ class APIOperationBase {
102102 } else
103103 {
104104 //TODO: slice added due to BOM character. remove once BOM character is removed.
105- var responseObj = JSON . parse ( body . slice ( 1 ) ) ;
106- logger . debug ( JSON . stringify ( responseObj , 2 , null ) ) ;
107- obj . _response = responseObj ;
105+ if ( typeof body !== 'undefined' ) {
106+ var responseObj = JSON . parse ( body . slice ( 1 ) ) ;
107+ logger . debug ( JSON . stringify ( responseObj , 2 , null ) ) ;
108+ obj . _response = responseObj ;
108109 /*
109110 var jsonResponse = JSON.stringify(body);
110111 console.log("escaped body : '" + escape(jsonResponse) + "'");
@@ -114,6 +115,11 @@ class APIOperationBase {
114115 */
115116 callback ( ) ;
116117 }
118+ else
119+ {
120+ logger . error ( "Undefined Response" ) ;
121+ }
122+ }
117123 } ) ;
118124
119125 logger . debug ( 'Exit APIOperationBase execute' ) ;
You can’t perform that action at this time.
0 commit comments