bibot 1.0.54 → 1.0.55
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +8 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -3286,7 +3286,11 @@ var createPluginAxiosInstance = function createPluginAxiosInstance(baseURL, para
|
|
3286
3286
|
try {
|
3287
3287
|
var errMsg = 'An unknown error occurred';
|
3288
3288
|
if (error.response) {
|
3289
|
-
|
3289
|
+
if (error.response.status === 504) {
|
3290
|
+
errMsg = 'Timeout error occurred';
|
3291
|
+
} else {
|
3292
|
+
errMsg = error.response.data.message || error.response.statusText;
|
3293
|
+
}
|
3290
3294
|
} else if (error.request) {
|
3291
3295
|
errMsg = 'No response received from the server.';
|
3292
3296
|
} else {
|
@@ -3595,7 +3599,7 @@ var askBiBot = function askBiBot(pluginAxiosInstance, data) {
|
|
3595
3599
|
}
|
3596
3600
|
});
|
3597
3601
|
}, function (error) {
|
3598
|
-
if (error.
|
3602
|
+
if (error.message === timeoutMessage) {
|
3599
3603
|
return Promise.resolve(handleRetries(pluginAxiosInstance, data, 1));
|
3600
3604
|
} else {
|
3601
3605
|
return {
|
@@ -3615,7 +3619,7 @@ var askTimedOutBiBot = function askTimedOutBiBot(pluginAxiosInstance, data) {
|
|
3615
3619
|
return response.data;
|
3616
3620
|
});
|
3617
3621
|
}, function (error) {
|
3618
|
-
if (error.
|
3622
|
+
if (error.message === timeoutMessage) {
|
3619
3623
|
return {
|
3620
3624
|
message: defaultSlacker
|
3621
3625
|
};
|
@@ -3630,6 +3634,7 @@ var askTimedOutBiBot = function askTimedOutBiBot(pluginAxiosInstance, data) {
|
|
3630
3634
|
}
|
3631
3635
|
};
|
3632
3636
|
var defaultSlacker = "BiBot_Retry_Later";
|
3637
|
+
var timeoutMessage = 'Timeout error occurred';
|
3633
3638
|
|
3634
3639
|
var useBiBotChatBot = function useBiBotChatBot(bibotProps) {
|
3635
3640
|
var sendInputInquiry = function sendInputInquiry() {
|