Kumpala, Deepak DEEKU Thank you for posting your question in Microsoft Q&A. Context Variable is set using set-variable
policy (reference: Set variable) via expression or string literal and then available in every policy expression via context. Variables as IReadOnlyDictionary<string, object>.
So, you need to set variable Value
before accessing it and based on the exception, this key was not set in the policy and hence you got the exception above. Please check out the reference docs on how to set and retrieve the variables. If you are setting this value in your policy, please share the full code snippet.
For your second question, it looks like you are trying to retrieve IResponse object, and you can use context.Response like context.Response.Body.As<JObject>(preserveContent: true)
and available properties are described as below:
I hope this helps with your question and let me know if you have any other questions.