SSH node, continue on error

Describe the problem/error/question:

Problem is that SSH node create error: connect ECONNREFUSED, but does’t transfer that error to the next node

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Next node only see this: “Error running node ‘SSH to Mikrotik’”, no JSON, TABLE or SCHEMA data.

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via: Docker
  • Operating system:

Hello @banjo_vu,

First of all, are you sure there is a successful connection?
What does your connection test show?

Hello mohamed3nan, thank you for the reply!

I perfectly understand why this error happened, in this case SSH service was disabled on router. My goal is to pass error information to the user through Respond Webhook, log error information into database…

Hi @banjo_vu,

do you want to pass the error even if the connection isn’t successful?!

In this case, I would wrap the SSH node inside a sub-workflow, then configure the Execute Sub-workflow node’s On Error setting to Continue (using error output),

This way, you’ll get the connection error in the Error branch, as shown here:

And the sub-workflow approach looks something like this:

2 Likes

Thank you Mohamed for that suggestion, I will try that approach.:folded_hands:

2 Likes

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