0

{ "message": "Foo request failed", "errors": [ "Error converting value {null} to type 'System.Boolean'. Path '[43].Group_Is_Full', line 1, position 30730.", "Null object cannot be converted to a value type." ] }

My goal is to narrow down the exact piece of code in which this error occurred. I cannot step through it easily in prod for a variety of reasons.

So, does Path '[43] , line 1, position 30730 provide me with anything that can help in that regard (I don't know what any of those numbers refer to and that's my question).

P.S. This is coming from a .NET C# Web API 2 backend. It's a response to a POST request that comes back with a 400.

Edit:

This is the body of the json being sent, I am looking into it more, stand by for more updates:

{
  "contactId": 999999,
  "address": {
    "addressLine1": "9999 Foo ave",
    "addressLine2": null,
    "city": "Phoenix",
    "state": "AZ",
    "zip": "43127"
  },
  "isHomeAddress": true,
  "contactNumber": "513-123-4568",
  "groupDescription": "Lol join this, its awesome"
}
VSO
  • 11,546
  • 25
  • 99
  • 187
  • 2
    "exact piece of code" so, how about to show some code to us? – Aleks Andreev Aug 08 '17 at 16:55
  • 1
    @AleksAndreev the point of the question is he's asking how to identify the problem code from the error message. –  Aug 08 '17 at 16:56
  • @AleksAndreev What Amy said - I am trying to find where this error is occurring, I can figure out the code myself once I actually find it. – VSO Aug 08 '17 at 16:57
  • @VSO You're posting a huge JSON object, at least 30,730 characters. I expect `[43]` is the 43rd position in an array you're sending. Inspect your JSON and look at the 43rd element in the array. It's `Group_Is_Full` property is either null or undefined. `Path '[43].Group_Is_Full'` is actually the location in the JSON that is causing trouble, not the location in your code. –  Aug 08 '17 at 16:59
  • Could you show your code that call web API? Maybe something wrong with parameters. – Hung Quach Aug 08 '17 at 17:01
  • @Amy I am not seeing that - that body is directly from the request that fails, but maybe I am missing something, there are situations where that much json gets sent. Looking more. – VSO Aug 08 '17 at 17:08
  • @HungQuach The code that calls it is fine - it works locally, so the issue is somewhere on the backend. – VSO Aug 08 '17 at 17:09
  • @VSO The JSON you pasted into the question isn't congruent with the error path. I am doubtful you have identified the errant content. –  Aug 08 '17 at 17:09
  • @Amy: Yea, I am inclined to agree - I am looking, ty for the help. – VSO Aug 08 '17 at 17:11
  • @VSO @Amy must be right about `Group_Is_Full` property in JSON. You missed actual request and posted here wrong JSON. Check it again. – Vitaliy Smolyakov Aug 08 '17 at 18:38

0 Answers0