generaltranslation 2.0.62 → 2.0.63
Sign up to get free protection for your applications and to get access to all the features.
@@ -83,11 +83,9 @@ function _translateBundle(gt, requests) {
|
|
83
83
|
case 6:
|
84
84
|
error_1 = _g.sent();
|
85
85
|
if (error_1 instanceof Error && error_1.name === 'AbortError') {
|
86
|
-
|
87
|
-
return [2 /*return*/, Array.from(requests, function () { return ({ translation: null, error: 'Request timed out' }); })];
|
86
|
+
throw new Error('Error: Request timed out.');
|
88
87
|
}
|
89
|
-
|
90
|
-
return [2 /*return*/, Array.from(requests, function () { return ({ translation: null, error: error_1 }); })];
|
88
|
+
throw new Error("".concat(error_1));
|
91
89
|
case 7: return [2 /*return*/];
|
92
90
|
}
|
93
91
|
});
|
@@ -74,11 +74,9 @@ function _updateProjectDictionary(gt, updates, languages, projectID, replace) {
|
|
74
74
|
case 5:
|
75
75
|
error_1 = _d.sent();
|
76
76
|
if (error_1 instanceof Error && error_1.name === 'AbortError') {
|
77
|
-
|
78
|
-
return [2 /*return*/, []];
|
77
|
+
throw new Error('Error: Request timed out.');
|
79
78
|
}
|
80
|
-
|
81
|
-
return [2 /*return*/, []];
|
79
|
+
throw new Error("".concat(error_1));
|
82
80
|
case 6: return [2 /*return*/];
|
83
81
|
}
|
84
82
|
});
|
@@ -89,17 +89,9 @@ function _translateReact(gt, content, targetLanguage, metadata) {
|
|
89
89
|
case 6:
|
90
90
|
error_1 = _d.sent();
|
91
91
|
if (error_1 instanceof Error && error_1.name === 'AbortError') {
|
92
|
-
|
93
|
-
return [2 /*return*/, {
|
94
|
-
translation: null,
|
95
|
-
error: 'Request timed out'
|
96
|
-
}];
|
92
|
+
throw new Error('Error: Request timed out.');
|
97
93
|
}
|
98
|
-
|
99
|
-
return [2 /*return*/, {
|
100
|
-
translation: null,
|
101
|
-
error: error_1
|
102
|
-
}];
|
94
|
+
throw new Error("".concat(error_1));
|
103
95
|
case 7: return [2 /*return*/];
|
104
96
|
}
|
105
97
|
});
|
@@ -91,17 +91,9 @@ function _translate(gt, content, targetLanguage, metadata) {
|
|
91
91
|
case 6:
|
92
92
|
error_1 = _d.sent();
|
93
93
|
if (error_1 instanceof Error && error_1.name === 'AbortError') {
|
94
|
-
|
95
|
-
return [2 /*return*/, {
|
96
|
-
translation: content,
|
97
|
-
error: 'Request timed out'
|
98
|
-
}];
|
94
|
+
throw new Error('Error: Request timed out.');
|
99
95
|
}
|
100
|
-
|
101
|
-
return [2 /*return*/, {
|
102
|
-
translation: content,
|
103
|
-
error: error_1
|
104
|
-
}];
|
96
|
+
throw new Error("".concat(error_1));
|
105
97
|
case 7: return [2 /*return*/];
|
106
98
|
}
|
107
99
|
});
|