n8n: add Fleet Ops endpoint to receive workflow error reports
New POST /api/v1/integrations/n8n/workflow-error, service-token authenticated, for the central "Fleet Ops — Workflow Error Handler" n8n workflow to report a bounded, secret-free failure (workflow id/ name, execution id, safe error category, trigger context, correlation id, attempt, retry action). Idempotent on execution_id via the same audit-event precheck pattern used by /return-callback, so a redelivered error report is not registered twice. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
e0c107a94a
commit
bbdb4a9ae8
@@ -143,6 +143,27 @@ class ScanResultOut(BaseModel):
|
||||
created: dict[str, int]
|
||||
|
||||
|
||||
class WorkflowErrorReportIn(BaseModel):
|
||||
workflow_id: str = Field(max_length=120)
|
||||
workflow_name: str = Field(max_length=200)
|
||||
execution_id: str = Field(max_length=120)
|
||||
failed_at: datetime
|
||||
error_category: Literal[
|
||||
"timeout", "authError", "connectionError", "httpError", "validationError", "unknown"
|
||||
]
|
||||
error_summary: str = Field(max_length=500)
|
||||
trigger_context: str | None = Field(default=None, max_length=200)
|
||||
correlation_id: str | None = None
|
||||
attempt: int = Field(default=1, ge=1, le=1000)
|
||||
retry_action: str | None = Field(default=None, max_length=200)
|
||||
|
||||
|
||||
class WorkflowErrorReportResult(BaseModel):
|
||||
status: Literal["registered", "already_registered"]
|
||||
execution_id: str
|
||||
occurred_at: datetime
|
||||
|
||||
|
||||
class ProvideFieldsRequest(BaseModel):
|
||||
fields: dict[str, str]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user