Skip to content

error-recovery

Fresh

Source: BIBLE.md (Phase 12 Phase 3, error-recovery 5 routes, quarantine after 5 failures)

Failure tracking per account. Quarantine after 5 consecutive failures.

Routes (5)

MethodRouteWhat
POST/error-recovery/logLog a failure
GET/error-recovery/account/:idFailure history for account
GET/error-recovery/recentRecent failures
POST/error-recovery/quarantine-checkCheck if account should be quarantined
POST/error-recovery/clear/:accountIdClear failure history

Failure log entry

json
{
  "accountId": "abc123",
  "timestamp": "2026-05-20T12:00:00Z",
  "type": "cookie-expired",
  "platform": "reddit",
  "details": "Login redirect to /signin",
  "stackTrace": "..."
}

Quarantine trigger

5 consecutive failures within 24 hours: account is auto-quarantined via accounts/:id/quarantine with reason "error-recovery:consecutive-failures".

Hand-off to self-healing

When a failure is logged, error-recovery calls self-healing/classify to attempt auto-fix before escalating to quarantine.