{"record":{"id":"c9c9641766b23601","repo":"appsmithorg/appsmith","slug":"extractexecutionerrormessage-e","errorCode":null,"errorMessage":"${extractExecutionErrorMessage(e)}","messagePattern":"\\$\\{extractExecutionErrorMessage\\(e\\)\\}","errorType":"exception","errorClass":"PluginActionExecutionError","httpStatus":null,"severity":"error","filePath":"app/client/src/sagas/ActionExecution/PluginActionSaga.ts","lineNumber":1571,"sourceCode":"\n      throw new UserCancelledActionExecutionError();\n    }\n\n    // In case there is no response from server and files are being uploaded\n    // we report it as INVALID_RESPONSE. The server didn't send any code or the\n    // request was cancelled due to timeout\n    if (filePickerInstrumentation.numberOfFiles > 0) {\n      triggerFileUploadInstrumentation(\n        filePickerInstrumentation,\n        \"INVALID_RESPONSE\",\n        \"444\",\n        pluginAction.name,\n        pluginAction.pluginType,\n        \"NA\",\n      );\n    }\n\n    throw new PluginActionExecutionError(\n      extractExecutionErrorMessage(e),\n      false,\n    );\n  }\n}\n\n// Function to send the file upload event to segment\nfunction triggerFileUploadInstrumentation(\n  // TODO: Fix this the next time the file is edited\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  filePickerInfo: Record<string, any>,\n  status: string,\n  statusCode: string,\n  pluginName: string,\n  pluginType: string,\n  timeTaken: string,\n) {\n  const { fileSizes, fileTypes, numberOfFiles, totalSize } = filePickerInfo;","sourceCodeStart":1553,"sourceCodeEnd":1589,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/client/src/sagas/ActionExecution/PluginActionSaga.ts#L1553-L1589","documentation":"Terminal fallback thrown by the file-upload branch of executePluginActionSaga. After the saga has ruled out a client-side validation error and a user cancellation, any remaining exception is wrapped in a PluginActionExecutionError whose message comes from extractExecutionErrorMessage(). That helper normalises Axios transport errors (timeout, network error), server envelopes from validateResponse, and falls back to 'Response not valid', so the original raw upstream body or credentials are never surfaced. The second constructor arg is false, marking this as a genuine failure rather than a user cancel.","triggerScenarios":"A plugin action that uploads files returns a non-2xx response, hits Axios' request timeout, suffers a network failure, or returns a payload that fails validateResponse. It also fires when the server closes the connection mid-upload (instrumentation logs status INVALID_RESPONSE / 444).","commonSituations":"Action timeout in settings too low for large uploads; datasource base URL wrong or down; CORS preflight rejected; file exceeds server max body size; plugin response schema changed after a backend upgrade; reverse proxy (nginx/cloudfront) truncating long uploads.","solutions":["If the toast reads 'Action execution timed out', increase the action's timeout-in-settings or split the upload into smaller chunks.","Open the browser Network panel and confirm the request reaches the Appsmith server (no DNS/CORS/502); check the response status and body the server returned.","Verify the datasource configuration (base URL, auth, headers) still matches the upstream API contract.","If a proxy/gateway sits in front of the server, raise its max body size and read timeout (e.g. nginx client_max_body_size, proxy_read_timeout).","Check server logs for the request id to see whether the plugin itself rejected the upload."],"exampleFix":"// In the API action settings, raise the timeout\n// before: action timeout = 10000ms (default)\n// after:  action timeout = 60000ms\n//\n// nginx (if a 413 / truncated response is the cause):\n// before: client_max_body_size 1m;\n// after:  client_max_body_size 50m;","handlingStrategy":"try-catch","validationCode":"// Before triggering an upload action, sanity-check the inputs\nif (!file || file.size > MAX_BYTES) {\n  showAlert('File too large or missing', 'error');\n  return;\n}","typeGuard":"function isPluginActionExecutionError(e: unknown): e is PluginActionExecutionError {\n  return e instanceof Error && e.name === 'PluginActionExecutionError';\n}","tryCatchPattern":"try {\n  await runPluginAction({ ... });\n} catch (e) {\n  if (e instanceof Error && e.name === 'UserCancelledActionExecutionError') return;\n  // PluginActionExecutionError: surface the normalised message\n  showAlert(e?.message ?? 'Upload failed', 'error');\n}","preventionTips":["Validate file size and type in a JS object before calling the upload action.","Keep action timeout aligned with the largest expected upload.","Confirm datasource base URL and CORS headers before going live."],"tags":["plugin-action","file-upload","axios","network","timeout"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}