Unexpected Cannot read properties of undefined (reading 'error') while using a GraphQL node

Describe the problem/error/question

Unexpected Cannot read properties of undefined (reading ‘error’) while using a GraphQL node

What is the error message (if any)?

{
  "errorMessage": "Cannot read properties of undefined (reading 'error')",
  "errorDetails": {},
  "n8nDetails": {
    "n8nVersion": "1.102.4 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "TypeError: Cannot read properties of undefined (reading 'error')",
      "    at WorkflowExecute.handleNodeErrorOutput (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2348:26)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1619:15",
      "    at processTicksAndRejections (node:internal/process/task_queues:105:5)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2153:11"
    ]
  }
}

Please share your workflow

Github Gist of the workflow : n8n-graphql-workflow.json · GitHub

Share the output returned by the last node

[
  {
    "username": "jane_doe"
  }
]

Information on your n8n setup

# Debug info

## core

- n8nVersion: 1.102.4
- platform: docker (self-hosted)
- nodeJsVersion: 22.17.0
- database: postgres
- executionMode: regular
- concurrency: -1
- license: community
- consumerId: unknown

## storage

- success: all
- error: all
- progress: false
- manual: true
- binaryMode: memory

## pruning

- enabled: true
- maxAge: 336 hours
- maxCount: 10000 executions

## client

- userAgent: mozilla/5.0 (x11; linux x86_64; rv:142.0) gecko/20100101 firefox/142.0
- isTouchDevice: false

Generated at: 2025-09-19T13:42:32.921Z

I’ve continue to do some tests after posting.

It seems the problem is linked to having two GraphQL nodes chained, both using a token through an n8n “credential”. It looks like the session is dropped after the first usage, so, to bypass the error, I duplicate my token request before each GraphQL node …

But it’s not very efficient

hello @florian_briand

I suppose the GraphQL node doesn’t work with the error branch. Try setting the error behavior to “continue“.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.