If the workflow service agent is not provided with required parameters, an exception with following message is raised:
Parameter name: Missing key to
Where to
is the parameter that is not provided.
It is caused by incorrect instancing of ArgumentOutOfRangeException
- ArgumentOutOfRangeException Constructor (System) | Microsoft Docs
The constructor with two string parameters should be used, the first should contain just the parameter name and the second should hold the information message.
Related code: