{"action":"created","issue":{"url":"https://api.github.com/repos/developerforce/Force.com-Toolkit-for-NET/issues/122","repository_url":"https://api.github.com/repos/developerforce/Force.com-Toolkit-for-NET","labels_url":"https://api.github.com/repos/developerforce/Force.com-Toolkit-for-NET/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/developerforce/Force.com-Toolkit-for-NET/issues/122/comments","events_url":"https://api.github.com/repos/developerforce/Force.com-Toolkit-for-NET/issues/122/events","html_url":"https://github.com/developerforce/Force.com-Toolkit-for-NET/issues/122","id":93856307,"number":122,"title":"Need some help troubleshooting an error I'm getting when using the toolkit.","user":{"login":"Telarian","id":959980,"avatar_url":"https://avatars.githubusercontent.com/u/959980?v=3","gravatar_id":"","url":"https://api.github.com/users/Telarian","html_url":"https://github.com/Telarian","followers_url":"https://api.github.com/users/Telarian/followers","following_url":"https://api.github.com/users/Telarian/following{/other_user}","gists_url":"https://api.github.com/users/Telarian/gists{/gist_id}","starred_url":"https://api.github.com/users/Telarian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Telarian/subscriptions","organizations_url":"https://api.github.com/users/Telarian/orgs","repos_url":"https://api.github.com/users/Telarian/repos","events_url":"https://api.github.com/users/Telarian/events{/privacy}","received_events_url":"https://api.github.com/users/Telarian/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/developerforce/Force.com-Toolkit-for-NET/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-08T18:19:03Z","updated_at":"2016-03-29T14:30:57Z","closed_at":"2015-08-28T20:05:56Z","body":"I'm getting the following error when using the toolkit:\r\n```\r\nNewtonsoft.Json.JsonSerializationException occurred\r\n  HResult=-2146233088\r\n  Message=Error converting value \"/services/data/v32.0/sobjects/Listing__c/a0co0000006tzdMAAQ\" to type 'Salesforce.Common.Models.ErrorResponse'.\r\n```\r\n\r\nI'm not real sure why it would be trying to convert that string to an error response, so I'm not sure where to begin troubleshooting.\r\n\r\nThe code that's throwing the error is pretty simple:\r\n```\r\nAwait client.UpsertExternalAsync(\"Listing__c\", \"OPAS_Combo_Listing_Id__c\", String.Format(\"LL-{0}\", ll.Id.ToString()), t)\r\n```\r\n\r\nt is a simple expando object that has been filled out to match the salesforce object we are upserting.\r\nThe upsert seems to have been completed. Everything seems to have worked except that it's throwing this error.\r\n\r\nI've been using this code for some time with no problems. This just came up suddenly. So, I was thinking maybe something was funny about this particular data to cause the problem, but it seems pretty standard.\r\n\r\nI have the full error data here:\r\n```\r\nNewtonsoft.Json.JsonSerializationException occurred\r\n  HResult=-2146233088\r\n  Message=Error converting value \"/services/data/v32.0/sobjects/Listing__c/a0co0000006tzdMAAQ\" to type 'Salesforce.Common.Models.ErrorResponse'. Path '[0]', line 1, position 62.\r\n  Source=Newtonsoft.Json\r\n  StackTrace:\r\n       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)\r\n       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)\r\n       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)\r\n       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)\r\n       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)\r\n       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)\r\n       at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)\r\n       at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)\r\n       at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)\r\n       at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)\r\n       at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)\r\n       at Salesforce.Common.ServiceHttpClient.<HttpPatchAsync>d__36.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n       at Sylvester.Main_Form.VB$StateMachine_1_TransmitLeadsToSalesForce.MoveNext() in C:\\Users\\ToryN\\Documents\\Visual Studio 2013\\Projects\\Distro\\Sylvester\\Main_Form.vb:line 890\r\n  InnerException: System.ArgumentException\r\n       HResult=-2147024809\r\n       Message=Could not cast or convert from System.String to Salesforce.Common.Models.ErrorResponse.\r\n       Source=Newtonsoft.Json\r\n       StackTrace:\r\n            at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)\r\n            at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)\r\n            at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)\r\n       InnerException: \r\n```\r\n\r\nAny assistance would be greatly appreciated."},"comment":{"url":"https://api.github.com/repos/developerforce/Force.com-Toolkit-for-NET/issues/comments/202921983","html_url":"https://github.com/developerforce/Force.com-Toolkit-for-NET/issues/122#issuecomment-202921983","issue_url":"https://api.github.com/repos/developerforce/Force.com-Toolkit-for-NET/issues/122","id":202921983,"user":{"login":"blandoe","id":18145407,"avatar_url":"https://avatars.githubusercontent.com/u/18145407?v=3","gravatar_id":"","url":"https://api.github.com/users/blandoe","html_url":"https://github.com/blandoe","followers_url":"https://api.github.com/users/blandoe/followers","following_url":"https://api.github.com/users/blandoe/following{/other_user}","gists_url":"https://api.github.com/users/blandoe/gists{/gist_id}","starred_url":"https://api.github.com/users/blandoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blandoe/subscriptions","organizations_url":"https://api.github.com/users/blandoe/orgs","repos_url":"https://api.github.com/users/blandoe/repos","events_url":"https://api.github.com/users/blandoe/events{/privacy}","received_events_url":"https://api.github.com/users/blandoe/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T14:30:57Z","updated_at":"2016-03-29T14:30:57Z","body":"Reproducible - have the ExternalId pointing to two records.  Fiddler shows the TextView return from webservice call as the below.  To be clear, Fiddler's JSON view correctly shows it as two nodes.\r\n\r\n77\r\n[\"/services/data/v32.0/sobjects/Account/xxxxxxxxxxxxxxxxxx\",\"/services/data/v32.0/sobjects/Account/xxxxxxxxxxxxxxxxxx\"]\r\n0\r\n\r\n"}}