Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions app/client/src/sagas/EvalErrorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,35 +255,35 @@ export function* evalErrorHandler(
});
}

log.error(error);

break;
}
case EvalErrorTypes.EVAL_TREE_ERROR: {
toast.show(createMessage(ERROR_EVAL_ERROR_GENERIC), {
kind: "error",
});
log.error(error);
Sentry.captureException(error);
break;
}
case EvalErrorTypes.BAD_UNEVAL_TREE_ERROR: {
log.error(error);
Sentry.captureException(error);
break;
}
case EvalErrorTypes.EVAL_PROPERTY_ERROR: {
log.debug(error);
Sentry.captureException(error);
log.error(error);
break;
}
case EvalErrorTypes.CLONE_ERROR: {
/*
* https://github.com/appsmithorg/appsmith/issues/2654
* This code is being commented out to prevent these errors from going to Sentry
* till we come up with a more definitive solution to prevent this error
* Proposed solution - adding lint errors to editor to prevent these from happening
* */

// Sentry.captureException(new Error(error.message), {
// extra: {
// request: error.context,
// },
// });
log.debug(error);
Sentry.captureException(new Error(error.message), {
extra: {
request: error.context,
},
});
break;
}
case EvalErrorTypes.PARSE_JS_ERROR: {
Expand All @@ -293,6 +293,8 @@ export function* evalErrorHandler(
AppsmithConsole.error({
text: `${error.message} at: ${error.context?.propertyPath}`,
});
log.error(error);
Sentry.captureException(error);
break;
}
case EvalErrorTypes.EXTRACT_DEPENDENCY_ERROR: {
Expand All @@ -302,7 +304,8 @@ export function* evalErrorHandler(
break;
}
default: {
log.debug(error);
log.error(error);
Sentry.captureException(error);
}
}
});
Expand Down
1 change: 1 addition & 0 deletions app/client/src/utils/DynamicBindingUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ export interface EvalError {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
context?: Record<string, any>;
stack?: string;
}

export interface DynamicPath {
Expand Down
21 changes: 9 additions & 12 deletions app/client/src/workers/Evaluation/handlers/evalTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import type { EvalMetaUpdates } from "ee/workers/common/DataTreeEvaluator/types"
import { makeEntityConfigsAsObjProperties } from "ee/workers/Evaluation/dataTreeUtils";
import type { DataTreeDiff } from "ee/workers/Evaluation/evaluationUtils";
import { serialiseToBigInt } from "ee/workers/Evaluation/evaluationUtils";
import {
CrashingError,
getSafeToRenderDataTree,
} from "ee/workers/Evaluation/evaluationUtils";
import { getSafeToRenderDataTree } from "ee/workers/Evaluation/evaluationUtils";
import type { EvalTreeRequestData, EvalWorkerASyncRequest } from "../types";
import { clearAllIntervals } from "../fns/overrides/interval";
import JSObjectCollection from "workers/Evaluation/JSObject/Collection";
Expand Down Expand Up @@ -272,14 +269,14 @@ export async function evalTree(
logs = dataTreeEvaluator.logs;
}

if (!(error instanceof CrashingError)) {
errors.push({
type: EvalErrorTypes.UNKNOWN_ERROR,
message: (error as Error).message,
});
// eslint-disable-next-line
console.error(error);
}
errors.push({
type: EvalErrorTypes.EVAL_TREE_ERROR,
message: (error as Error).message,
stack: (error as Error).stack,
});

// eslint-disable-next-line
console.error(error);

dataTree = getSafeToRenderDataTree(
makeEntityConfigsAsObjProperties(unevalTree, {
Expand Down
Loading