Skip to content

Commit 63cab5b

Browse files
authored
showing error message on failed clone row task (#1687)
1 parent f2e1f95 commit 63cab5b

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

src/dashboard/Data/Browser/Browser.react.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -821,15 +821,20 @@ class Browser extends DashboardView {
821821
for (const object of objects) {
822822
toClone.push(object.clone());
823823
}
824-
await Parse.Object.saveAll(toClone, { useMasterKey: true });
825-
this.setState({
826-
selection: {},
827-
data: [
828-
...toClone,
829-
...this.state.data,
830-
],
831-
showCloneSelectedRowsDialog: false,
832-
});
824+
try {
825+
await Parse.Object.saveAll(toClone, { useMasterKey: true });
826+
this.setState({
827+
selection: {},
828+
data: [...toClone, ...this.state.data],
829+
showCloneSelectedRowsDialog: false
830+
});
831+
} catch (error) {
832+
this.setState({
833+
selection: {},
834+
showCloneSelectedRowsDialog: false
835+
});
836+
this.showNote(error.message, true);
837+
}
833838
}
834839

835840
getClassRelationColumns(className) {

0 commit comments

Comments
 (0)