In case of unsuccessful authorization, the VK response does not contain the "response" property, therefore it throws a KeyNotFoundException
using var enumerator = container.RootElement.GetProperty("response").EnumerateArray();
Expected behaviour
In case of unsuccessful authorization, VK response an "error" property instead of a "response". If there is an "error" property in the root, throw the custom exception
Actual behaviour
In case of unsuccessful authorization, the VK response does not contain the "response" property, therefore it throws a KeyNotFoundException
If you could provide a full sample response for when there's an error, or even better submit a pull request with a proposed fix for it, then this is likely to get fixed sooner.
If you could provide a full sample response for when there's an error, or even better submit a pull request with a proposed fix for it, then this is likely to get fixed sooner.
Describe the bug
In case of unsuccessful authorization, the VK response does not contain the "response" property, therefore it throws a KeyNotFoundException
Expected behaviour
In case of unsuccessful authorization, VK response an "error" property instead of a "response". If there is an "error" property in the root, throw the custom exception
Actual behaviour
In case of unsuccessful authorization, the VK response does not contain the "response" property, therefore it throws a KeyNotFoundException