Problem
User-facing Observability renders persisted job errors verbatim. This exposes implementation and infrastructure details that users cannot act on and may disclose sensitive configuration names, internal routes, provider details, or stack information.
Concrete incident on 2026-08-04: Trigger-based runs displayed:
INTERNAL_API_SECRET is required for delegated internal API calls
This was a Mogplex runtime configuration failure, not a user error. The underlying failure should remain available to operators, but a user should see a safe message such as:
Mogplex could not start the workspace for this run. Retry the run, or contact support if it continues.
Current direct rendering path:
lib/workflows/automation-job-workflow.ts persists the raw caught error to job_runs.error.
app/(dashboard)/[scope]/observability/_components/job-expanded-row.tsx renders job.error verbatim as the Run Error.
Expected behavior
Introduce a centralized error-presentation boundary for user-facing workflow and Observability surfaces:
- Preserve full raw errors in internal diagnostics such as server logs, Sentry, and Trigger.dev metadata.
- Return/render a sanitized display error to users.
- Keep genuinely user-actionable failures specific, such as missing model selection, invalid flow configuration, repository authorization, or quota limits.
- Map platform configuration, machine-auth, provider-internal, database, stack-trace, and unknown failures to safe product language with a stable error or correlation ID.
- Never expose secret names, secret values, internal hostnames/routes, stack traces, SQL/provider internals, or raw exception envelopes.
- Apply sanitization to existing persisted errors at the API/presentation boundary so old records are safe without requiring a data migration.
Acceptance criteria
Security note
This is primarily a trust and UX defect, but the allowlist should be conservative because raw exception text can become an information-disclosure issue as integrations and providers add more detailed errors.
Problem
User-facing Observability renders persisted job errors verbatim. This exposes implementation and infrastructure details that users cannot act on and may disclose sensitive configuration names, internal routes, provider details, or stack information.
Concrete incident on 2026-08-04: Trigger-based runs displayed:
This was a Mogplex runtime configuration failure, not a user error. The underlying failure should remain available to operators, but a user should see a safe message such as:
Current direct rendering path:
lib/workflows/automation-job-workflow.tspersists the raw caught error tojob_runs.error.app/(dashboard)/[scope]/observability/_components/job-expanded-row.tsxrendersjob.errorverbatim as the Run Error.Expected behavior
Introduce a centralized error-presentation boundary for user-facing workflow and Observability surfaces:
Acceptance criteria
INTERNAL_API_SECRET.job_runs.error, node-run errors, AI-call errors, or tool errors without classification.Security note
This is primarily a trust and UX defect, but the allowlist should be conservative because raw exception text can become an information-disclosure issue as integrations and providers add more detailed errors.