-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Expected Behavior
When an Activity throws an Error I would expect the error to be successfully propagated back to the Workflow, where it can be gracefully handled using normal try catch (or not, and allowed to transistion the workflow into a runtime FAILED status)
Actual Behavior
- propagating of error fails
- Workflow remains in a
RUNNINGstate, and is now stuck.
Steps to Reproduce the Problem
Using the Dapr QuickStarts, modify one of the Activities within orderProcessingWorkflow.ts and throw an error e.g throw new Error("Something went wrong!");
Build the app, and start a new workflow.
Observe the logs :
== APP - order-processor == Verifying inventory for b6c25c32-1d7c-4e5d-8178-852fdfe324c5 of 1 car
== APP - order-processor == Error: Something went wrong!
== APP - order-processor == at verifyInventoryActivity (/Users/olivertomlinson/Desktop/dev/quickstarts/workflows/javascript/sdk/dist/orderProcessingWorkflow.js:17:11)
== APP - order-processor == at activityWrapper (/Users/olivertomlinson/Desktop/dev/quickstarts/workflows/javascript/sdk/node_modules/@dapr/dapr/workflow/runtime/WorkflowRuntime.js:85:20)
== APP - order-processor == at ActivityExecutor.execute (/Users/olivertomlinson/Desktop/dev/quickstarts/workflows/javascript/sdk/node_modules/@dapr/durabletask-js/worker/activity-executor.js:21:30)
== APP - order-processor == at TaskHubGrpcWorker._executeActivity (/Users/olivertomlinson/Desktop/dev/quickstarts/workflows/javascript/sdk/node_modules/@dapr/durabletask-js/worker/task-hub-grpc-worker.js:237:43)
== APP - order-processor == at ClientReadableStreamImpl.<anonymous> (/Users/olivertomlinson/Desktop/dev/quickstarts/workflows/javascript/sdk/node_modules/@dapr/durabletask-js/worker/task-hub-grpc-worker.js:132:26)
== APP - order-processor == at ClientReadableStreamImpl.emit (node:events:512:28)
== APP - order-processor == at addChunk (node:internal/streams/readable:324:12)
== APP - order-processor == at readableAddChunk (node:internal/streams/readable:297:9)
== APP - order-processor == at Readable.push (node:internal/streams/readable:234:10)
== APP - order-processor == at Object.onReceiveMessage (/Users/olivertomlinson/Desktop/dev/quickstarts/workflows/javascript/sdk/node_modules/@grpc/grpc-js/build/src/client.js:349:24)
== APP - order-processor == An error occurred while trying to execute activity 'verifyInventoryActivity': Something went wrong!
== APP - order-processor == Failed to deliver activity response for 'verifyInventoryActivity#2' of orchestration ID 'b6c25c32-1d7c-4e5d-8178-852fdfe324c5' to sidecar: 2 UNKNOWN: unknown instance ID/task ID combo: /2
fetch the status of the workflow and notice it is still in running state
{
"instanceID": "b6c25c32-1d7c-4e5d-8178-852fdfe324c5",
"workflowName": "orderProcessingWorkflow",
"createdAt": "2025-07-04T08:57:26.547359Z",
"lastUpdatedAt": "2025-07-04T08:57:26.576156Z",
"runtimeStatus": "RUNNING",
"properties": {
"dapr.workflow.input": "{\"itemName\":\"car\",\"totalCost\":5000,\"quantity\":1}"
}
}
note : If you stop and restart the App, you will see the same error.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog