azure-functions-powershell-worker
azure-functions-powershell-worker copied to clipboard
Invoke-ActivityFunction: Why is the `Input` attribute required?
While running a PowerShell durable function, I've stumbled across an exception I'm confused about:
Invoke-ActivityFunction -FunctionName 'FireTheCigarettes'
# Exception:
# Type: System.ArgumentNullException
# Message: Value cannot be null. (Parameter 'input')
I've realised that the Input parameter is set as [ValidateNotNull], but my activity function FireTheCigarettes doesn't require any input. Im wondering why the attribute is required, and doesn't have a sensible default?
https://github.com/Azure/azure-functions-powershell-worker/blob/622867482d16441ce342e5e90f8e7aeb050b5d20/src/Durable/InvokeActivityFunctionCommand.cs#L13-L30
I'm an idiot, please ignore me. This error was being thrown on the way back up because I wasn't returning anything from the action function. Although the error message wasn't very intuitive.
You're not an idiot. I wasted 8+h until I found this here...
This is something we should address. I'm going to re-open this issue for tracking. I'll look to make a sensible default. Apologies for the confusion in the API.