{"record":{"id":"04e0896c84b4e647","repo":"n8n-io/n8n","slug":"error-message-04e089","errorCode":null,"errorMessage":"${error.message}","messagePattern":"\\$\\{error\\.message\\}","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/Microsoft/MicrosoftAgent365Trigger.node.ts","lineNumber":287,"sourceCode":"\t\t\t\t\t\t? { microsoftMcpToolLogs: activityCapture.mcpToolLogs }\n\t\t\t\t\t\t: {}),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tnoWebhookResponse: true,\n\t\t\t\tworkflowData: [this.helpers.returnJsonArray({ ...returnData })],\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconst errorData = error.response?.data;\n\t\t\tif (typeof errorData === 'object' && 'error' in errorData) {\n\t\t\t\tconst message = 'Error: ' + String(errorData.error);\n\t\t\t\tconst description = (errorData.error_description as string) ?? error.message;\n\n\t\t\t\tthrow new NodeOperationError(node, message, { description });\n\t\t\t}\n\n\t\t\tthrow new NodeOperationError(node, error.message);\n\t\t}\n\t}\n}\n","sourceCodeStart":269,"sourceCodeEnd":291,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/Microsoft/MicrosoftAgent365Trigger.node.ts#L269-L291","documentation":"Fallback branch of the Microsoft 365 Agent trigger webhook catch block, taken only when the error has no response.data.error envelope. Wraps the raw error.message as a NodeOperationError with no description. Covers any non-OAuth-structured failure inside the webhook handler.","triggerScenarios":"Network/transport errors (ECONNRESET, ETIMEDOUT) calling Microsoft, JSON parse failures on the request body, unexpected activity shape, missing helper return, or an uncaught throw inside the adapter callback that isn't an HTTP-layer error.","commonSituations":"Intermittent network blip to Graph; malformed incoming activity (custom client instead of real Bot Framework); a node version mismatch where the activity shape changed; downstream Graph call timing out.","solutions":["Inspect error.message in the execution — it's the raw underlying message with no enrichment.","If it's a network/timeout error, Microsoft retries Bot Framework deliveries, so often no action is needed beyond monitoring.","For malformed-activity errors, validate that the caller is the real Bot Framework (not a manual POST).","Re-run with verbose logging to capture the full error object (stack/code) for diagnosis."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isStructuredError(e: unknown): boolean {\n  return !!e && typeof e === 'object' && !!(e as { response?: { data?: { error?: unknown } } }).response?.data?.error;\n}","tryCatchPattern":"try {\n  await webhook();\n} catch (e) {\n  if (!isStructuredError(e)) {\n    // raw message path: log code/stack for diagnosis, monitor for recurrence\n    console.error('Microsoft trigger raw error:', (e as Error).message, (e as { code?: string }).code);\n  }\n  throw e;\n}","preventionTips":["Monitor webhook executions; Bot Framework auto-retries transient network errors so isolated failures often self-heal.","Validate that callers are the real Bot Framework, not manual POSTs sending unexpected activity shapes.","Run with verbose logging when diagnosing to capture the full error code/stack."],"tags":["microsoft","bot-framework","webhook","catch-all","network","node-operation-error"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}