From 7e85ad9d14f047c0b46a9ed7f7890180b7359fef Mon Sep 17 00:00:00 2001 From: Trisha Anand Date: Thu, 25 Jan 2024 19:07:32 +0530 Subject: [PATCH] Revert "fix: debugger errors CE" (#30639) Reverts appsmithorg/appsmith#30596 ## Summary by CodeRabbit - **Refactor** - Streamlined error message content during plugin action execution. - Simplified entity payload information handling. - **Chores** - Restricted the scope of a debugger utility function for internal use. --- app/client/src/ce/utils/getEntityPayloadInfo.ts | 1 - app/client/src/sagas/ActionExecution/PluginActionSaga.ts | 4 ++-- app/client/src/sagas/EvalErrorHandler.ts | 2 +- app/client/src/sagas/InitSagas.ts | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/client/src/ce/utils/getEntityPayloadInfo.ts b/app/client/src/ce/utils/getEntityPayloadInfo.ts index 247cd2ce19..be68792e9e 100644 --- a/app/client/src/ce/utils/getEntityPayloadInfo.ts +++ b/app/client/src/ce/utils/getEntityPayloadInfo.ts @@ -15,7 +15,6 @@ export const getEntityPayloadInfo: Record< iconId: string; id: string; pluginType?: PluginType | string; - entityName?: string; } > = { [ENTITY_TYPE.WIDGET]: (entityConfig) => { diff --git a/app/client/src/sagas/ActionExecution/PluginActionSaga.ts b/app/client/src/sagas/ActionExecution/PluginActionSaga.ts index 3fd78855e1..3c89a8e5c6 100644 --- a/app/client/src/sagas/ActionExecution/PluginActionSaga.ts +++ b/app/client/src/sagas/ActionExecution/PluginActionSaga.ts @@ -622,12 +622,12 @@ export default function* executePluginActionTriggerSaga( }); if (onError) { throw new PluginTriggerFailureError( - createMessage(ERROR_ACTION_EXECUTE_FAIL, pluginActionNameToDisplay), + createMessage(ERROR_ACTION_EXECUTE_FAIL, action.name), [payload.body, params], ); } else { throw new PluginTriggerFailureError( - createMessage(ERROR_PLUGIN_ACTION_EXECUTE, pluginActionNameToDisplay), + createMessage(ERROR_PLUGIN_ACTION_EXECUTE, action.name), [], ); } diff --git a/app/client/src/sagas/EvalErrorHandler.ts b/app/client/src/sagas/EvalErrorHandler.ts index f2e118fd54..db561f2a97 100644 --- a/app/client/src/sagas/EvalErrorHandler.ts +++ b/app/client/src/sagas/EvalErrorHandler.ts @@ -130,7 +130,7 @@ function logLatestEvalPropertyErrors( messages: errorMessages, source: { id: payloadInfo.id, - name: payloadInfo.entityName || entityName, + name: entityName, type: entityType as ENTITY_TYPE, propertyPath: logPropertyPath, pluginType: payloadInfo.pluginType, diff --git a/app/client/src/sagas/InitSagas.ts b/app/client/src/sagas/InitSagas.ts index 6828eee771..dc75cc0f67 100644 --- a/app/client/src/sagas/InitSagas.ts +++ b/app/client/src/sagas/InitSagas.ts @@ -341,7 +341,7 @@ export function* startAppEngine(action: ReduxAction) { } } -export function* resetDebuggerLogs() { +function* resetDebuggerLogs() { // clear all existing debugger errors const debuggerErrors: ReturnType = yield select(getDebuggerErrors);