whole_func_string: function interceptPromiseResponse(hasIntercepted, promise, doneHookInfo) {
      let {hook} = doneHookInfo;
      return promise.then(
          res => (hasIntercepted ? doneHookInfo.resData : hook(null, res)),
          err => {
              // check whether is intercepted to avoid repeated interception
              if (hasIntercepted) {
                  let {resException, resData} = doneHookInfo;
                  if (resException) {
                      throw resData;
                  }
                  return resData;
              }
  
              return hook(err || /* istanbul ignore next */ 'err');
          }
      );
  }
func_code_string: function interceptPromiseResponse(hasIntercepted, promise, doneHookInfo) {
      let {hook} = doneHookInfo;
      return promise.then(
          res => (hasIntercepted ? doneHookInfo.resData : hook(null, res)),
          err => {
              // check whether is intercepted to avoid repeated interception
              if (hasIntercepted) {
                  let {resException, resData} = doneHookInfo;
                  if (resException) {
                      throw resData;
                  }
                  return resData;
              }
  
              return hook(err || /* istanbul ignore next */ 'err');
          }
      );
  }
func_documentation_string: Intercept the API promise response
  
  @inner
  @param {boolean} hasIntercepted whether intercepted by the API call arguments
  @param {Promise} promise the promise response
  @param {Object} doneHookInfo the done hook info
  @return {Promise}