-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
P2Priority 2 itemPriority 2 item
Description
Describe the bug
When calling an activity with RetryOptions
, if the maximum allowed amount of time spent retrying is exceeded, the orchestration stops. No exception is thrown that can be caught.
Investigative information
- Durable Functions extension version: Extension Bundle [4.0.0, 5.0.0)
- durable-functions npm module version: 3.1.0
- Language (JavaScript/TypeScript) and version: JavaScript
- Node.js version: v21.7.3
To Reproduce
Activity code:
const df = require('durable-functions');
const handler = async (input, context) => {
await new Promise((resolve) => setTimeout(resolve, 3000));
throw new Error('Simulated error after some time');
};
df.app.activity('activity', {
handler
});
Orchestration code:
const df = require('durable-functions');
const retryOptions = new df.RetryOptions(1_500, 4);
retryOptions.retryTimeoutInMilliseconds = 10_000;
const handler = function* (context) {
try {
yield context.df.callActivityWithRetry('activity', retryOptions);
context.info('Activity succeeded');
} catch (e) {
context.info('Activity failed');
} finally {
context.info('Done');
}
};
df.app.orchestration('orchestration', handler);
Nothing will be logged when running this orchestration: the code doesn't reach the context.info('Activity succeeded');
statement, nor is an exception thrown.
Expected behavior
An exception should be thrown.
Actual behavior
No exception thrown, no value yielded from the callActivityWithRetry
. Basically the orchestration is 'stuck' (but it's still in a Running state when queried through the instance API).
Metadata
Metadata
Assignees
Labels
P2Priority 2 itemPriority 2 item