Skip to content

Activity functions throw an ArgumentNullException when they don't return a value #1099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bachuv opened this issue Nov 14, 2024 · 0 comments
Labels

Comments

@bachuv
Copy link
Contributor

bachuv commented Nov 14, 2024

Summary: Not returning a value in an activity function throws an ArgumentNullException saying Value cannot be null. (Parameter: input). Durable Functions docs state that activity functions can optionally return a value (https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-powershell-vscode#create-your-functions).

Repro:

This code throws the exception

param($name)

Write-Host "Hello $name!" 

This code works as expected

param($name)

"Hello $name!" 

Workaround:
Return a non-null value from the activity function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants