Skip to content

Commit 1f53d7e

Browse files
committed
chore: improve error messaging on save failure
1 parent b1e7985 commit 1f53d7e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

custom/VisionAction.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ async function runAiActions() {
292292
}
293293
const limit = pLimit(props.meta.concurrencyLimit || 10);
294294
const tasks = recordIds.value
295-
.filter(id => !uncheckedRecordIds.has(String(id)))
296295
.map(id => limit(() => processOneRecord(String(id))));
297296
await Promise.all(tasks);
298297
}
@@ -778,6 +777,7 @@ async function convertImages(fieldName, img) {
778777
779778
780779
async function saveData() {
780+
const errorText = 'Failed to save some records. Not all data may be saved'
781781
try {
782782
isLoading.value = true;
783783
const [reqData, checkedRecords] = await prepareDataForSave();
@@ -841,16 +841,16 @@ async function saveData() {
841841
timeout: 'unlimited',
842842
});
843843
isError.value = true;
844-
errorMessage.value = t(`Failed to save data. You are not allowed to save.`);
844+
errorMessage.value = t(errorText);
845845
} else {
846846
console.error('Error saving data:', failedResult);
847847
isError.value = true;
848-
errorMessage.value = t(`Failed to save data. Please, try to re-run the action.`);
848+
errorMessage.value = t(errorText);
849849
}
850850
} catch (error) {
851851
console.error('Error saving data:', error);
852852
isError.value = true;
853-
errorMessage.value = t(`Failed to save data. Please, try to re-run the action.`);
853+
errorMessage.value = t(errorText);
854854
} finally {
855855
isLoading.value = false;
856856
isDataSaved.value = true;

0 commit comments

Comments
 (0)