Skip to content

step to task#2906

Merged
grutt merged 2 commits intomainfrom
chore(ts)--naming-and-loging-consistency
Feb 2, 2026
Merged

step to task#2906
grutt merged 2 commits intomainfrom
chore(ts)--naming-and-loging-consistency

Conversation

@grutt
Copy link
Copy Markdown
Contributor

@grutt grutt commented Feb 2, 2026

Description

Improves the clarity of cancellation-related log messages in the TypeScript SDK. Previously, when a workflow was cancelled, the SDK would log misleading error messages like "Could not wait for step run to finish: Cancelled by worker" at the error level, causing confusion since cancellation is expected behavior, not a failure.

This PR:

  1. Changes cancellation-related logs from error to debug level
  2. Updates terminology from "step run" to "task run" for consistency with current naming conventions

Type of change

  • Refactor (non-breaking changes to code which doesn't change any behaviour)

What's Changed

  • Changed handleStartStepRun catch block to log cancellations at debug level while keeping real failures at error level
  • Changed handleCancelStepRun catch block to use debug level since the promise rejection is expected during cancellation
  • Updated all log messages to use "task run" instead of "step run"
  • Updated CHANGELOG.md for version 1.10.8

Before:

[ERROR/Worker/analyst-worker] Could not wait for step run to finish: Cancelled by worker
[ERROR/Worker/analyst-worker] Could not cancel step run: Cancelled by worker

After:

[DEBUG/Worker/analyst-worker] Task run XXX-XXX-XXX-XXX-XXX was cancelled
[DEBUG/Worker/analyst-worker] Task run XXX-XXX-XXX-XXX-XXX cancellation completed

@grutt grutt requested a review from mrkaye97 February 2, 2026 14:09
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Feb 2, 2026 2:12pm

Request Review

@grutt grutt merged commit 2c1ff4f into main Feb 2, 2026
13 checks passed
@grutt grutt deleted the chore(ts)--naming-and-loging-consistency branch February 2, 2026 14:32
@promptless-for-oss
Copy link
Copy Markdown

📝 Documentation updates detected!

New suggestion: Update terminology from "step run" to "task run" for consistency


Tip: Add or adjust Promptless's style guide in Agent Knowledge Base ✍️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants