@pronto-tools-and-more/network-process 6.10.0 → 6.10.1
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -14,7 +14,7 @@ export const handleZipUploadError = async ({
|
|
14
14
|
console.info();
|
15
15
|
return {
|
16
16
|
retry: true,
|
17
|
-
|
17
|
+
retryMessage: `[pronto-network-process] Cloudfront 504 error, retrying ${maxRetries} more times in ${waitBetweenRetries}ms`,
|
18
18
|
};
|
19
19
|
} else {
|
20
20
|
throw new Error(`Failed to upload zip: Cloudfront 504 error`);
|
@@ -33,7 +33,7 @@ export const handleZipUploadError = async ({
|
|
33
33
|
if (maxRetries > 0) {
|
34
34
|
return {
|
35
35
|
retry: true,
|
36
|
-
|
36
|
+
retryMessage: `[pronto-network-process] processing resources error, retrying ${maxRetries} more times in ${waitBetweenRetries}ms`,
|
37
37
|
};
|
38
38
|
} else {
|
39
39
|
throw new Error(`Failed to upload zip: Processing resources error`);
|
@@ -58,13 +58,14 @@ export const uploadZip = async ({
|
|
58
58
|
}
|
59
59
|
return text;
|
60
60
|
} catch (error) {
|
61
|
-
const { retry,
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
61
|
+
const { retry, retryMessage } =
|
62
|
+
await HandleZipUploadError.handleZipUploadError({
|
63
|
+
error,
|
64
|
+
maxRetries,
|
65
|
+
waitBetweenRetries,
|
66
|
+
});
|
66
67
|
if (retry) {
|
67
|
-
console.info(
|
68
|
+
console.info(retryMessage);
|
68
69
|
await Timeout.wait(waitBetweenRetries);
|
69
70
|
return uploadZip({
|
70
71
|
file,
|