Catch Data Tree update error and better sentry logging (#6627)
This commit is contained in:
parent
22e477da8f
commit
25a6590b47
|
|
@ -2,6 +2,7 @@ import { ReduxAction, ReduxActionTypes } from "constants/ReduxActionConstants";
|
|||
import { applyChange, Diff } from "deep-diff";
|
||||
import { DataTree } from "entities/DataTree/dataTreeFactory";
|
||||
import { createImmerReducer } from "utils/AppsmithUtils";
|
||||
import * as Sentry from "@sentry/react";
|
||||
|
||||
export type EvaluatedTreeState = DataTree;
|
||||
|
||||
|
|
@ -25,7 +26,16 @@ const evaluatedTreeReducer = createImmerReducer(initialState, {
|
|||
if (!Array.isArray(update.path) || update.path.length === 0) {
|
||||
continue;
|
||||
}
|
||||
applyChange(state, undefined, update);
|
||||
try {
|
||||
applyChange(state, undefined, update);
|
||||
} catch (e) {
|
||||
Sentry.captureException(e, {
|
||||
extra: {
|
||||
update,
|
||||
updateLength: updates.length,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
[ReduxActionTypes.FETCH_PAGE_INIT]: () => initialState,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user