Skip to content

Add exponential backoff for transform function failures #240

@caringan

Description

@caringan

We've observed that the transform function occasionally fails to run without any error logs. This appears to be a case of dropped invocations.

Proposed solution

Add support for exponential backoff with retries in transform.ts. This would help ensure reliable processing even in the face of:

  • Cold starts
  • Temporary resource exhaustion
  • Concurrency-related dropouts

Additional Context

In our logs, we’ve seen triggers (e.g., updates to a document) that should call transform, but the function doesn’t run, and the response defaults to HTML.

Example trigger timestamps:

  • 2025-05-20T03:40:39 — Extension triggered, but transform was not triggered, and extension throws an invalid json error.
  • Function is usually stable, so this appears to be an intermittent issue.

This reliability gap could be covered by a retry mechanism with exponential backoff.

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions