bibot 1.0.54 → 1.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3283,7 +3283,11 @@ var createPluginAxiosInstance = function createPluginAxiosInstance(baseURL, para
3283
3283
  try {
3284
3284
  var errMsg = 'An unknown error occurred';
3285
3285
  if (error.response) {
3286
- errMsg = error.response.data.message;
3286
+ if (error.response.status === 504) {
3287
+ errMsg = 'Timeout error occurred';
3288
+ } else {
3289
+ errMsg = error.response.data.message || error.response.statusText;
3290
+ }
3287
3291
  } else if (error.request) {
3288
3292
  errMsg = 'No response received from the server.';
3289
3293
  } else {
@@ -3592,7 +3596,7 @@ var askBiBot = function askBiBot(pluginAxiosInstance, data) {
3592
3596
  }
3593
3597
  });
3594
3598
  }, function (error) {
3595
- if (error.response && error.response.status === 504) {
3599
+ if (error.message === timeoutMessage) {
3596
3600
  return Promise.resolve(handleRetries(pluginAxiosInstance, data, 1));
3597
3601
  } else {
3598
3602
  return {
@@ -3612,7 +3616,7 @@ var askTimedOutBiBot = function askTimedOutBiBot(pluginAxiosInstance, data) {
3612
3616
  return response.data;
3613
3617
  });
3614
3618
  }, function (error) {
3615
- if (error.response && error.response.status === 504) {
3619
+ if (error.message === timeoutMessage) {
3616
3620
  return {
3617
3621
  message: defaultSlacker
3618
3622
  };
@@ -3627,6 +3631,7 @@ var askTimedOutBiBot = function askTimedOutBiBot(pluginAxiosInstance, data) {
3627
3631
  }
3628
3632
  };
3629
3633
  var defaultSlacker = "BiBot_Retry_Later";
3634
+ var timeoutMessage = 'Timeout error occurred';
3630
3635
 
3631
3636
  var useBiBotChatBot = function useBiBotChatBot(bibotProps) {
3632
3637
  var sendInputInquiry = function sendInputInquiry() {