feat(03-01): add error handling for action flow
- Add docker-error route to Check Match Count switch (matchCount < 0) - Add Send Docker Error node for Docker connection failures - Route Docker API errors to user-facing error messages - Ensure all error paths reach a Send Message node (no silent failures) - Error messages include diagnostic details per CONTEXT.md requirements
This commit is contained in:
@@ -246,6 +246,29 @@
|
|||||||
"parameters": {
|
"parameters": {
|
||||||
"rules": {
|
"rules": {
|
||||||
"values": [
|
"values": [
|
||||||
|
{
|
||||||
|
"id": "docker-error",
|
||||||
|
"conditions": {
|
||||||
|
"options": {
|
||||||
|
"caseSensitive": true,
|
||||||
|
"leftValue": "",
|
||||||
|
"typeValidation": "strict"
|
||||||
|
},
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"id": "count-negative",
|
||||||
|
"leftValue": "={{ $json.matchCount }}",
|
||||||
|
"rightValue": "0",
|
||||||
|
"operator": {
|
||||||
|
"type": "number",
|
||||||
|
"operation": "lt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"combinator": "and"
|
||||||
|
},
|
||||||
|
"renameOutput": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "no-match",
|
"id": "no-match",
|
||||||
"conditions": {
|
"conditions": {
|
||||||
@@ -443,6 +466,28 @@
|
|||||||
"name": "Telegram API"
|
"name": "Telegram API"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"resource": "message",
|
||||||
|
"operation": "sendMessage",
|
||||||
|
"chatId": "={{ $json.chatId }}",
|
||||||
|
"text": "={{ $json.text }}",
|
||||||
|
"additionalFields": {
|
||||||
|
"parse_mode": "HTML"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": "telegram-send-docker-error",
|
||||||
|
"name": "Send Docker Error",
|
||||||
|
"type": "n8n-nodes-base.telegram",
|
||||||
|
"typeVersion": 1.2,
|
||||||
|
"position": [1780, 200],
|
||||||
|
"credentials": {
|
||||||
|
"telegramApi": {
|
||||||
|
"id": "telegram-credential",
|
||||||
|
"name": "Telegram API"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"connections": {
|
"connections": {
|
||||||
@@ -574,6 +619,13 @@
|
|||||||
},
|
},
|
||||||
"Check Match Count": {
|
"Check Match Count": {
|
||||||
"main": [
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Send Docker Error",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"node": "Format No Match",
|
"node": "Format No Match",
|
||||||
|
|||||||
Reference in New Issue
Block a user