temporalio / temporalio/sdk-typescript
[Feature Request] Warn user when sending unregistered signal
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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