@commercetools-frontend-extensions/import-resources-modal 1.15.0 → 1.15.1
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.
|
@@ -549,6 +549,11 @@ var messages$5 = reactIntl.defineMessages({
|
|
|
549
549
|
description: 'Generic notification message when file upload fails',
|
|
550
550
|
defaultMessage: 'An unexpected error occurred during the file upload. Please try again, or contact support if this error occurs again.'
|
|
551
551
|
},
|
|
552
|
+
uploadIsTakingTooLong: {
|
|
553
|
+
id: 'operations.import.resource.upload.uploadIsTakingTooLong',
|
|
554
|
+
description: 'Notification message when file upload is taking longer than expected',
|
|
555
|
+
defaultMessage: 'Upload timed out. Please reduce your file size or split the data into smaller files and try again.'
|
|
556
|
+
},
|
|
552
557
|
missingRequiredField: {
|
|
553
558
|
id: 'ImportResourcesModal.missingRequiredField',
|
|
554
559
|
description: 'Error message displayed when a required field is missing',
|
|
@@ -1031,6 +1036,19 @@ const useUpload = () => {
|
|
|
1031
1036
|
} else if (error.errorData?.invalid > 0) {
|
|
1032
1037
|
actions.setUploadFileResponse(error.errorData);
|
|
1033
1038
|
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1039
|
+
} else if (error.statusCode === 408) {
|
|
1040
|
+
actions.cancelImport();
|
|
1041
|
+
showNotification({
|
|
1042
|
+
kind: 'error',
|
|
1043
|
+
domain: constants.DOMAINS.PAGE,
|
|
1044
|
+
text: intl.formatMessage(messages$5.uploadIsTakingTooLong)
|
|
1045
|
+
});
|
|
1046
|
+
sentry.reportErrorToSentry(new Error('Upload File Error: The upload request timed out (408 Request Timeout)'), {
|
|
1047
|
+
extra: {
|
|
1048
|
+
resourceType: state.resourceType,
|
|
1049
|
+
fileSizeInBytes: state.droppedFile?.size
|
|
1050
|
+
}
|
|
1051
|
+
});
|
|
1034
1052
|
} else {
|
|
1035
1053
|
actions.cancelImport();
|
|
1036
1054
|
showNotification({
|
|
@@ -549,6 +549,11 @@ var messages$5 = reactIntl.defineMessages({
|
|
|
549
549
|
description: 'Generic notification message when file upload fails',
|
|
550
550
|
defaultMessage: 'An unexpected error occurred during the file upload. Please try again, or contact support if this error occurs again.'
|
|
551
551
|
},
|
|
552
|
+
uploadIsTakingTooLong: {
|
|
553
|
+
id: 'operations.import.resource.upload.uploadIsTakingTooLong',
|
|
554
|
+
description: 'Notification message when file upload is taking longer than expected',
|
|
555
|
+
defaultMessage: 'Upload timed out. Please reduce your file size or split the data into smaller files and try again.'
|
|
556
|
+
},
|
|
552
557
|
missingRequiredField: {
|
|
553
558
|
id: 'ImportResourcesModal.missingRequiredField',
|
|
554
559
|
description: 'Error message displayed when a required field is missing',
|
|
@@ -1031,6 +1036,19 @@ const useUpload = () => {
|
|
|
1031
1036
|
} else if (error.errorData?.invalid > 0) {
|
|
1032
1037
|
actions.setUploadFileResponse(error.errorData);
|
|
1033
1038
|
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1039
|
+
} else if (error.statusCode === 408) {
|
|
1040
|
+
actions.cancelImport();
|
|
1041
|
+
showNotification({
|
|
1042
|
+
kind: 'error',
|
|
1043
|
+
domain: constants.DOMAINS.PAGE,
|
|
1044
|
+
text: intl.formatMessage(messages$5.uploadIsTakingTooLong)
|
|
1045
|
+
});
|
|
1046
|
+
sentry.reportErrorToSentry(new Error('Upload File Error: The upload request timed out (408 Request Timeout)'), {
|
|
1047
|
+
extra: {
|
|
1048
|
+
resourceType: state.resourceType,
|
|
1049
|
+
fileSizeInBytes: state.droppedFile?.size
|
|
1050
|
+
}
|
|
1051
|
+
});
|
|
1034
1052
|
} else {
|
|
1035
1053
|
actions.cancelImport();
|
|
1036
1054
|
showNotification({
|
|
@@ -528,6 +528,11 @@ var messages$5 = defineMessages({
|
|
|
528
528
|
description: 'Generic notification message when file upload fails',
|
|
529
529
|
defaultMessage: 'An unexpected error occurred during the file upload. Please try again, or contact support if this error occurs again.'
|
|
530
530
|
},
|
|
531
|
+
uploadIsTakingTooLong: {
|
|
532
|
+
id: 'operations.import.resource.upload.uploadIsTakingTooLong',
|
|
533
|
+
description: 'Notification message when file upload is taking longer than expected',
|
|
534
|
+
defaultMessage: 'Upload timed out. Please reduce your file size or split the data into smaller files and try again.'
|
|
535
|
+
},
|
|
531
536
|
missingRequiredField: {
|
|
532
537
|
id: 'ImportResourcesModal.missingRequiredField',
|
|
533
538
|
description: 'Error message displayed when a required field is missing',
|
|
@@ -1010,6 +1015,19 @@ const useUpload = () => {
|
|
|
1010
1015
|
} else if (error.errorData?.invalid > 0) {
|
|
1011
1016
|
actions.setUploadFileResponse(error.errorData);
|
|
1012
1017
|
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1018
|
+
} else if (error.statusCode === 408) {
|
|
1019
|
+
actions.cancelImport();
|
|
1020
|
+
showNotification({
|
|
1021
|
+
kind: 'error',
|
|
1022
|
+
domain: DOMAINS.PAGE,
|
|
1023
|
+
text: intl.formatMessage(messages$5.uploadIsTakingTooLong)
|
|
1024
|
+
});
|
|
1025
|
+
reportErrorToSentry(new Error('Upload File Error: The upload request timed out (408 Request Timeout)'), {
|
|
1026
|
+
extra: {
|
|
1027
|
+
resourceType: state.resourceType,
|
|
1028
|
+
fileSizeInBytes: state.droppedFile?.size
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1013
1031
|
} else {
|
|
1014
1032
|
actions.cancelImport();
|
|
1015
1033
|
showNotification({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend-extensions/import-resources-modal",
|
|
3
3
|
"description": "Shared import modal for importing resources",
|
|
4
|
-
"version": "1.15.
|
|
4
|
+
"version": "1.15.1",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"pluralize": "8.0.0",
|
|
32
32
|
"prop-types": "15.8.1",
|
|
33
33
|
"ramda": "^0.32.0",
|
|
34
|
-
"@commercetools-frontend-extensions/operations": "3.
|
|
34
|
+
"@commercetools-frontend-extensions/operations": "3.4.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@commercetools-frontend/actions-global": "25.1.0",
|