Sume Format run status is spelled canceled with one L: fix your switch

A Format run ends as completed, failed, canceled or skipped. If your code matches cancelled with two Ls, a canceled run will look like it never ended.

5 min readSume
All posts

Sume writes the cancel status with one L: canceled. If your poller checks for cancelled, a canceled run never matches your terminal list, and the loop keeps polling until its own timeout. The status values on a Format run are queued, processing, completed, failed, canceled and skipped, per Sume's Runs and results page (read 2026-10-04).

It is a one-character bug and it hides well, because the run is fine and only your code misses it.

Which statuses are terminal?

The poll is over when a run reaches one of four.

Format run statuses from Sume's Runs and results docs, read 2026-10-04.
StatusTerminal?
queuedNo
processingNo
completedYes
failedYes
canceledYes
skippedYes

How do I write the check safely?

Use one shared constant, and treat the next_action field as a second opinion.

TERMINAL = {"completed", "failed", "canceled", "skipped"}


def is_done(run: dict) -> bool:
    return run["status"] in TERMINAL or run.get("next_action") == "none"

Why check `next_action` as well?

Because it is the server's own verdict: poll_status means keep going, retry_later is a transient gap, and none means stop. If a status spelling ever surprises you, next_action still ends the loop.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume