You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if I'm doing something wrong, but to test this issue I created a new function project. I added a durable http starter function, an orchestrator function, and the SendGrid function all using the command palette templates.
When I run this function locally and call the endpoint to kick off an orchestrator instance, the SendGrid function successfully sends an email. However, when the orchestrator does its "replay" immediately after that function executes, it generates an exception saying ERROR: Value cannot be null. (Parameter 'input'). I'm not sure how this is possible. It shouldn't be trying to execute again, since the replay should remember that it already did. Also, the 'input' (which for testing I just set to 'Hello') is definitely not null.
param($email, $TriggerMetadata)
Push-OutputBinding -Name 'Message' -Value (@{
subject = "Thanks for your order $($email)!"
content = @(@{
type = 'text/plain'
value = "Hi, thanks for your order!"
})
})
SendGrid's function.json (email addresses removed for privacy):
I've tried a couple of workarounds. I can use try/catch to catch the error that's caused by the 2nd/replay execution of the SendGrid function. The downside is I won't be aware of a legit error. The other thing I've tried successfully is calling SendGrid using its REST API in a function rather than using the output binding.
I'm not sure if I'm doing something wrong, but to test this issue I created a new function project. I added a durable http starter function, an orchestrator function, and the SendGrid function all using the command palette templates.
When I run this function locally and call the endpoint to kick off an orchestrator instance, the SendGrid function successfully sends an email. However, when the orchestrator does its "replay" immediately after that function executes, it generates an exception saying ERROR: Value cannot be null. (Parameter 'input'). I'm not sure how this is possible. It shouldn't be trying to execute again, since the replay should remember that it already did. Also, the 'input' (which for testing I just set to 'Hello') is definitely not null.
See codebelow and the attached error message.
I updated my Orchestrator run.ps1 to this:
My SendGrid run.ps1 is below:
SendGrid's function.json (email addresses removed for privacy):
Error Message.txt
The text was updated successfully, but these errors were encountered: