Files
unraid-docker-manager/.planning/phases/05-polish-deploy/05-02-PLAN.md
T
Lucas Berger b7cefd931e docs(05): create phase plan
Phase 05: Polish & Deploy
- 3 plans in 3 waves
- 1 parallel (Wave 1), 2 sequential (Waves 2-3)
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 21:00:51 -05:00

5.1 KiB

phase, plan, type, wave, depends_on, files_modified, autonomous, must_haves
phase plan type wave depends_on files_modified autonomous must_haves
05-polish-deploy 02 execute 2
05-01
n8n-workflow.json
true
truths artifacts key_links
Docker socket errors show 'Cannot connect to Docker' (not stack trace)
Failed actions show 'Failed to X' format (not verbose details)
User ID stored in n8n credentials (not hardcoded in workflow JSON)
path provides contains
n8n-workflow.json Terse error messages in response nodes Cannot connect to Docker
path provides contains
n8n-workflow.json Credential reference for user auth $credentials
from to via pattern
IF User Authenticated n8n credentials credential reference expression $credentials
Harden error handling with minimal user-facing messages and migrate user ID to n8n credentials system.

Purpose: Production-ready error UX and secure credential storage for workflow sharing. Output: Terse error messages, credential-based auth, exportable workflow without sensitive data.

<execution_context> @/home/luc/.claude/get-shit-done/workflows/execute-plan.md @/home/luc/.claude/get-shit-done/templates/summary.md </execution_context>

@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/05-polish-deploy/05-CONTEXT.md @.planning/phases/05-polish-deploy/05-RESEARCH.md @.planning/phases/05-polish-deploy/05-01-SUMMARY.md @n8n-workflow.json Task 1: Standardize error messages n8n-workflow.json Find all error response nodes and update their message text to follow minimal format:

Docker/infrastructure errors (detect "docker.sock" or "ECONNREFUSED" in error):

  • Message: "Cannot connect to Docker"

Action failures:

  • Pattern: "Failed to {action} {container}"
  • Examples: "Failed to start plex", "Failed to stop nginx"

No match errors:

  • Keep existing "No container matching 'X'" format (already terse)

Update these nodes to use terse format:

  • Send Docker Error -> "Cannot connect to Docker"
  • Send Action Result (error case) -> "Failed to {action} {container}"
  • Send Update Error -> "Failed to update {container}"
  • Send Logs Error -> "Failed to get logs for {container}"

Do NOT include:

  • Stack traces
  • HTTP status codes
  • Docker API error details
  • Technical debugging info

Per CONTEXT.md: "Minimal error messages - 'Failed to start plex' without verbose details" Grep workflow JSON for error messages - should be terse, no technical details. Manually test by stopping n8n's Docker socket access and sending command - should see "Cannot connect to Docker". All user-facing error messages follow terse format. Infrastructure errors show "Cannot connect to Docker". Action errors show "Failed to X Y" pattern.

Task 2: Migrate user ID to n8n credentials n8n-workflow.json Currently the workflow has hardcoded user ID in IF nodes for auth check. Per CONTEXT.md and RESEARCH.md, migrate to n8n credentials system.

Step 1: Create credential type reference in workflow

n8n credentials will be created manually by user during deployment, but workflow must reference them.

Step 2: Update auth check nodes

Find "IF User Authenticated" and "IF Callback Authenticated" nodes.

Change the condition from hardcoded ID comparison to credential reference:

// Old (hardcoded):
$json.message.from.id === 123456789

// New (credential reference):
$json.message.from.id === parseInt($credentials.telegramAuth.userId)

Note: The credential name "telegramAuth" with field "userId" follows RESEARCH.md pattern. User will create this credential during deployment (documented in README from Plan 03).

Step 3: Clean up sensitive data

Search workflow JSON for any hardcoded numeric IDs that look like Telegram user IDs (8+ digit numbers). Remove or replace with credential references.

Per CONTEXT.md: "Sensitive values (Telegram user ID) moved to n8n credentials system - not hardcoded in workflow JSON" Grep workflow JSON for 8+ digit numbers - should find none (except node position coordinates). Auth check nodes should reference $credentials.telegramAuth.userId. No hardcoded user ID in workflow JSON. Auth nodes use credential reference. Workflow can be safely exported/shared.

1. All error messages terse (no stack traces, no verbose details) 2. Docker socket errors produce "Cannot connect to Docker" 3. Action failures produce "Failed to X Y" format 4. No hardcoded Telegram user ID in workflow JSON 5. Auth nodes reference $credentials.telegramAuth.userId 6. Workflow exports cleanly without embedded secrets

<success_criteria>

  • Error messages fit in single Telegram line (no scrolling needed)
  • Zero hardcoded sensitive values in workflow JSON
  • grep -E '[0-9]{9,}' workflow.json returns only position coordinates </success_criteria>
After completion, create `.planning/phases/05-polish-deploy/05-02-SUMMARY.md`