Trying error WF, what is missing?

A one node WF (with its error WF set), the error WF does not trigger if I manually execute the WF
The function code is not correct

The WF :

     {
      "name": "error-cmd",
      "nodes": [
        {
          "parameters": {},
          "name": "Start",
          "type": "n8n-nodes-base.start",
          "typeVersion": 1,
          "position": [
            250,
            300
          ]
        },
        {
          "parameters": {
            "functionCode": "items[0].json.myVariable = 1\nmljmqsjfmljfmlqjsfmf\nreturn items;"
          },
          "name": "Function",
          "type": "n8n-nodes-base.function",
          "typeVersion": 1,
          "position": [
            500,
            300
          ]
        }
      ],
      "connections": {
        "Start": {
          "main": [
            [
              {
                "node": "Function",
                "type": "main",
                "index": 0
              }
            ]
          ]
        }
      },
      "active": false,
      "settings": {
        "errorWorkflow": "7"
      },
      "id": "8"
    }

The error WF :

{
  "name": "error-wf",
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {},
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        520,
        290
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "functionCode": "items[0].json.myVariable = 1;\nconsole.log(\"one error\");\nreturn items;"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        770,
        290
      ]
    }
  ],
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "id": "7"
}

Could you please fix the above workflows so that they can be easily copied.

Best by instead of using > in front of it, formatting it as a code block like described here with the three back-ticks:

I will then have a look. Thanks!

Really sorry jan, i’ve just used the proposed icons here, I didn’t know MD was ok here.

I just tested, it works totally fine for me. Did you test with a production workflow? Because Error-Workflows do not get executed when testing via the UI.

Thanks jan, yes it works, I had to remember to use the Active button instead of the manual “Execute WF” :no_mouth:

Great to hear that it works. Have fun!