Skip to content

fix(platform): classify a vendor's 429 from a live connector body as rate limited #5274

Closed

Description

@tale-code-bot

Found while working on #4943 (step 1).

Defect. A live connector failure is meant to be classified by the HTTP status its error carries: connectorFailureOf in services/platform/lib/engine/core/record/failure.ts maps 401/403 to CONNECTOR_AUTH, 404 to CONNECTOR_NOT_FOUND and 429 to CONNECTOR_RATE_LIMITED. reasonFamily puts 429 and 5xx in connector_unavailable, which does not count toward pausing a schedule. In production, though, the status never reaches the classifier:

  • The durable runtime classifies the dispatcher's LIVE_BODY_FAILED ConnectorError: see the catch in services/platform/backend/domains/automations/shim.ts that calls connectorFailureOf, and the place in services/platform/lib/connectors/dispatcher.ts that wraps a live body's error. The wrapper has no status, and nothing copies one onto it; the body's status survives only on cause. So a live body that throws an error with status: 429 is classified CONNECTOR_FAILED, family connector_error, which counts toward pausing a schedule.
  • The shim's test that classifies a busy service hides this, because it puts status on the wrapper with Object.assign, which the real dispatcher never does.
  • The yaml-js live bodies throw plain errors with no status at all. Slack's, for one, put the HTTP status only in the message text (Slack <action> failed (429): rate limited by Slack — retry later), so even the in-process executor classifies a Slack rate limit CONNECTOR_FAILED.

A connector scenario (#4943) that names a status is classified by that status. Once a connector ships a scenario with a 401, 404, 429 or 5xx, its tests and its live runs disagree until this is fixed.

Asked.

  • Keep a live body's status through the dispatcher, so that a vendor's 429 or 5xx is classified as unavailable in the durable runtime as it is in the in-process one. Either copy a numeric status from the body's error onto the wrapper, or have the shim read it from cause.
  • Let the live bodies report the vendor's status, for example from ctx.http's response, or by throwing an error with status.
  • Then let the scenarios that stand for these answers carry the same status. Until they do, the Slack scenario proof in services/platform/lib/shared/schemas/shipped-connectors.test.ts fails.

Regression test: a live body that answers a 429 fails as CONNECTOR_RATE_LIMITED, family connector_unavailable, through the real dispatcher and the durable shim (not a hand-built wrapper), and in the in-process executor.

Activity

  1. added
    bug
    service: platform
    agent-ready
    on Nov 1, 2026
  2. tale-code-bot commented on Nov 1, 2026

    @tale-code-bot
    CollaboratorAuthor

    Split while working on this issue (task TALE-367).

    • This issue's change (branch fix/live-connector-vendor-status):
      • the dispatcher keeps the status a live body's error carries on LIVE_BODY_FAILED;
      • both runtimes classify that status, so a 429 or 5xx is connector_unavailable;
      • both runtimes name the connector by its slug;
      • Slack's bodies throw with the vendor's status.
    • fix(platform): carry the vendor's status on every live body's error #5277: the other twelve shipped connectors with yaml-js live bodies (confluence, discord, forgejo, github, gmail, google-drive, jev, outlook, shopify, tavily, teams, twilio) still throw without the status, and get it there.
  3. added a commit that references this issue on Nov 1, 2026
    7e6f288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions