feat-error-handling
⚡ Improvements
Actionable protect, proof and init errors
Goal: Operators were seeing Node stacks, Request failed with status code 404, or [object Object] when a protect/proof job or a webhook/FTP init failed — no URL, no neo body, no git stderr.
Solution: One normalizeError pipeline (Axios, exec, HttpException, unknown) with secret redaction. Persist that shape on the task, return 400 on /protect instead of a silent 200, and show message first in task details and the init report (stack stays secondary). serializeError for SSE now delegates to the same normalizer (covers BCYIP-806 without a Nest interceptor).
Features:
- Task details: headline + optional stack accordion and copy
- Init report: message before stack
- Webhook/FTP init errors on the SSE stream are JSON-serializable and redacted
Implementation Details:
sendFile/ protect failures go throughtaskError→ normalized{ message, stack }- Secrets in URLs, remotes and stderr are redacted before persist / log / UI
- Heartbeat / neo-unreachable banner is still product, out of this change
Files Modified:
src/utils/normalize-error.ts- shared normalizer + redactionsrc/utils/normalize-error.spec.ts- Axios, exec, errno-like objects, secretssrc/protocol/bcyip/api.ts- wrap neo HTTP failuressrc/app.service.ts-executeCmdsviatoErrorsrc/core/task/task.service.ts-taskErrorpersists a normalized errorsrc/core/task/task.types.ts- persisted error shapesrc/core/logger/logger.service.ts-cleanDatauses the normalizersrc/app.controller.ts-POST /protectlogs and returns 400src/app.controller.protect.spec.ts- webhook protect returns 400 with normalized messagesrc/core/task/task.service.spec.ts-taskErrorpersists redacted headlinesrc/protocol/capacities/webhook-capacity/webhook-capacity.service.ts-serializeErrordelegates tonormalizeErrorsrc/protocol/capacities/webhook-capacity/webhook-capacity.service.spec.ts- serializeError coverageui/src/pages/dashboard/tasks.types.ts-ErrorStagefields optional to match API (stack,message,ts,archived)ui/src/components/atoms/TaskStageError.tsx- task error displayui/src/components/atoms/TaskStageError.test.tsx- headline / stack / clipboard copyui/src/pages/dashboard/taskDetails/GitTaskDetails.tsx- useTaskStageErrorui/src/pages/dashboard/taskDetails/FtpTaskDetails.tsx- useTaskStageErrorui/src/pages/settings/report/SourceGroupReport.tsx-resolveErrorText(message || stack)ui/src/pages/settings/report/SourceGroupReport.errorText.test.tsx- prefers message over stackui/src/pages/settings/report/UnitActionReport.tsx- same for standalone init unitsdocs/error-handling.md- design + implementation status