Skip to content

[Feature Request] Provide a way to distinguish error types in logs from TypeScript SDK (errors lose type info across Worker <-> Workflow) #1800

@antmendoza

Description

@antmendoza

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

Currently users cannot distinguish error types in Temporal’s TypeScript SDK logs, all logged errors appear as plain Error objects with no type information. This prevents detecting whether a failure came from an Activity or a Workflow, making it impossible to set appropriate log levels (e.g., log failures as ERROR instead of WARN).

Describe the solution you'd like

I see, it is a documented limitation of NodeJS. Can you guys introduce some indication of type in the field? As I pointed out above (type or code). It will solve the issue. Also, I noticed that failure field is also a string instead of proper object where we can see details. I understand if you change it to an object, it will be a breaking functionality for someone. Maybe we can introduce another one?

Additional context

Slack thread: https://temporalio.slack.com/archives/C01DKSMU94L/p1756795588257069

To be clear, what we’re talking about here are limitations of either Node or V8 themselves, not bugs of the Temporal SDK. See here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions