temporalio / temporalio/sdk-typescript

[Feature Request] Warn user when sending unregistered signal

Open
#444 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
917
Forks
224
Avg merge
3d 16h
Merged PRs (30d)
43

Description

Is your feature request related to a problem? Please describe.

When a user sends an unregistered signal, handle.signal() succeeds.

Describe the solution you'd like

They likely meant to send a registered signal and are wondering why their signal handler isn't running. We can provide clarity by logging a warning in development. It would be nice if the Client logged, but I don't think there's currently a way for it to know, so the Worker can log:

Warning: Workflow "my-workflow-id" received signal "fooSignal" but does not have a handler registered for "fooSignal". This may be due to:
- "fooSignal" is misspelled, either on the Client or in the Workflow.
- You haven't yet called `setHandler` for "fooSignal" in the Workflow.
- This Worker is running with an outdated version of your Workflow code that doesn't call `setHandler`. Try restarting this Worker process.
Additional context

Slack discussion: https://temporaltechnologies.slack.com/archives/C01FT8U10GK/p1640455191114100

Note that this isn't an issue for queries. await handle.query(unregisterdQuery) throws with: Workflow did not register a handler for unregisterdQuery

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the Worker handles signals received through handle.signal(), then inspect the workflow-side setHandler path. Confirm how development logging is handled and how registered versus unregistered signals are represented. Done means an unregistered signal produces the requested warning with the workflow ID, signal name, and listed troubleshooting context without changing registered-signal behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.