Take a look at the methods that are parsing once to check error conditions and parsing again afterward to get the actual response object. From review comments:
Here and elsewhere it might be nice to avoid parsing twice. Here we JObject.Parse() and then a few lines later unless there's an error condition, we JsonConvert.DeserializeObject<>(). I wonder if either by messing with MissingMemberHandling when deserializing, so that if it's an error object we still get the error info, or by using JObject.ToObject<>() after error checking we can do this without doing two full string parsing steps.
Take a look at the methods that are parsing once to check error conditions and parsing again afterward to get the actual response object. From review comments:
Here and elsewhere it might be nice to avoid parsing twice. Here we JObject.Parse() and then a few lines later unless there's an error condition, we JsonConvert.DeserializeObject<>(). I wonder if either by messing with MissingMemberHandling when deserializing, so that if it's an error object we still get the error info, or by using JObject.ToObject<>() after error checking we can do this without doing two full string parsing steps.